blob: b76e83d1d45cf0193cf5300b33cc4f96c5a1a3f9 [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
Brad Bishopd5ae7d92018-06-14 09:52:03 -070011PACKAGECONFIG ?= "\
12 ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
13"
14
15PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux,"
16
Patrick Williamsc0f7c042017-02-23 20:41:17 -060017RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
18"
19
20PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
21
22RCONFLICTS_${PN} = "atd"
23RREPLACES_${PN} = "atd"
24
25SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \
26 file://fix_parallel_build_error.patch \
27 file://posixtm.c \
28 file://posixtm.h \
29 file://file_replacement_with_gplv2.patch \
30 file://atd.init \
31 file://atd.service \
32 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
33 file://makefile-fix-parallel.patch \
34 file://0001-remove-glibc-assumption.patch \
35 "
36
37PAM_SRC_URI = "file://pam.conf.patch \
38 file://configure-add-enable-pam.patch"
39
40SRC_URI[md5sum] = "e7bd7b785b2cbb17e133d6bdc0fb099e"
41SRC_URI[sha256sum] = "0871923cab73050b98ace020664eb2ddc1e669e4166b5abb64d864d02fcefab9"
42
43UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/at/"
44
45EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
46 --with-daemon_username=root \
47 --with-daemon_groupname=root \
48 --with-jobdir=/var/spool/at/jobs \
49 --with-atspool=/var/spool/at/spool \
50 ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
51
52inherit autotools-brokensep systemd update-rc.d
53
54INITSCRIPT_NAME = "atd"
55INITSCRIPT_PARAMS = "defaults"
56
57SYSTEMD_SERVICE_${PN} = "atd.service"
58
59copy_sources() {
60 cp -f ${WORKDIR}/posixtm.[ch] ${S}
61}
62do_patch[postfuncs] += "copy_sources"
63
64do_install () {
65 oe_runmake -e "IROOT=${D}" install
66
67 install -d ${D}${sysconfdir}/init.d
68 install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd
69
70 # install systemd unit files
71 install -d ${D}${systemd_unitdir}/system
72 install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system
73 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service
74
Brad Bishop6e60e8b2018-02-01 10:27:11 -050075 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
Patrick Williamsc0f7c042017-02-23 20:41:17 -060076 install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
77 fi
78}