summaryrefslogtreecommitdiffstats
path: root/remote/modules/cron/module.build
blob: 932c3e85f8f29515dfbb17000b9c0ecf80d29f63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash


fetch_source() {

	# use our own patched source
	local TARBALL="vixie-cron-4.1-openslx.tgz"
	[ ! -e "${TARBALL}" ] && perror "${TARBALL} not found under ${MODULE_DIR}."

	mkdir "${MODULE_DIR}/src" || perror "Could not create ${MODULE_DIR}/src"
	tar xfz "${TARBALL}" -C "${MODULE_DIR}/src" || perror "Could not extract ${TARBALL} to ${MODULE_DIR}/src"
}

build() {

	# compilation
	cd "${MODULE_DIR}/src" || perror "Could not cd to '${MODULE_DIR}/src'. Did fetch_source work?"
	make cron || perror "Could not compile cron using 'make'."

	# copy to build dir, since there are no shared libs linked in
	mkdir -p "${MODULE_BUILD_DIR}/opt/openslx/sbin"
	cp "${MODULE_DIR}/src/cron" "${MODULE_BUILD_DIR}/opt/openslx/sbin/" || perror "Could copy cron binary to ${MODULE_BUILD_DIR}"

	cd - &>/dev/null
}

post_copy() {
	:
}