blob: 8fe3b437e60a1d3fb74854c045f23844c44eefce [file] [log] [blame]
Patrick Williamsc0f7c042017-02-23 20:41:17 -06001SUMMARY = "Delayed job execution and batch processing"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002HOMEPAGE = "http://blog.calhariz.com/"
Patrick Williamsc0f7c042017-02-23 20:41:17 -06003DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \
4the system load levels drop to a particular level."
5SECTION = "base"
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
Brad Bishop316dfdd2018-06-25 12:45:53 -04008DEPENDS = "flex flex-native bison-native \
Patrick Williamsc0f7c042017-02-23 20:41:17 -06009 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
10
11RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
12"
13
14PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
15
16RCONFLICTS_${PN} = "atd"
17RREPLACES_${PN} = "atd"
18
19SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \
20 file://fix_parallel_build_error.patch \
21 file://posixtm.c \
22 file://posixtm.h \
23 file://file_replacement_with_gplv2.patch \
24 file://atd.init \
25 file://atd.service \
26 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
27 file://makefile-fix-parallel.patch \
28 file://0001-remove-glibc-assumption.patch \
29 "
30
31PAM_SRC_URI = "file://pam.conf.patch \
32 file://configure-add-enable-pam.patch"
33
34SRC_URI[md5sum] = "e7bd7b785b2cbb17e133d6bdc0fb099e"
35SRC_URI[sha256sum] = "0871923cab73050b98ace020664eb2ddc1e669e4166b5abb64d864d02fcefab9"
36
37UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/at/"
38
39EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
40 --with-daemon_username=root \
41 --with-daemon_groupname=root \
42 --with-jobdir=/var/spool/at/jobs \
43 --with-atspool=/var/spool/at/spool \
44 ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
45
46inherit autotools-brokensep systemd update-rc.d
47
48INITSCRIPT_NAME = "atd"
49INITSCRIPT_PARAMS = "defaults"
50
51SYSTEMD_SERVICE_${PN} = "atd.service"
52
53copy_sources() {
54 cp -f ${WORKDIR}/posixtm.[ch] ${S}
55}
56do_patch[postfuncs] += "copy_sources"
57
58do_install () {
59 oe_runmake -e "IROOT=${D}" install
60
61 install -d ${D}${sysconfdir}/init.d
62 install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd
63
64 # install systemd unit files
65 install -d ${D}${systemd_unitdir}/system
66 install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system
67 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service
68
Brad Bishop6e60e8b2018-02-01 10:27:11 -050069 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
Patrick Williamsc0f7c042017-02-23 20:41:17 -060070 install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
71 fi
72}