Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1 | SUMMARY = "Delayed job execution and batch processing" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2 | HOMEPAGE = "http://blog.calhariz.com/" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 3 | DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \ |
| 4 | the system load levels drop to a particular level." |
| 5 | SECTION = "base" |
| 6 | LICENSE = "GPLv2+" |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 8 | DEPENDS = "flex flex-native bison-native \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 9 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" |
| 10 | |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 11 | PACKAGECONFIG ?= "\ |
| 12 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ |
| 13 | " |
| 14 | |
| 15 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux," |
| 16 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 17 | RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \ |
| 18 | " |
| 19 | |
| 20 | PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits" |
| 21 | |
| 22 | RCONFLICTS_${PN} = "atd" |
| 23 | RREPLACES_${PN} = "atd" |
| 24 | |
| 25 | SRC_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 | |
| 37 | PAM_SRC_URI = "file://pam.conf.patch \ |
| 38 | file://configure-add-enable-pam.patch" |
| 39 | |
| 40 | SRC_URI[md5sum] = "e7bd7b785b2cbb17e133d6bdc0fb099e" |
| 41 | SRC_URI[sha256sum] = "0871923cab73050b98ace020664eb2ddc1e669e4166b5abb64d864d02fcefab9" |
| 42 | |
| 43 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/at/" |
| 44 | |
| 45 | EXTRA_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 | |
| 52 | inherit autotools-brokensep systemd update-rc.d |
| 53 | |
| 54 | INITSCRIPT_NAME = "atd" |
| 55 | INITSCRIPT_PARAMS = "defaults" |
| 56 | |
| 57 | SYSTEMD_SERVICE_${PN} = "atd.service" |
| 58 | |
| 59 | copy_sources() { |
| 60 | cp -f ${WORKDIR}/posixtm.[ch] ${S} |
| 61 | } |
| 62 | do_patch[postfuncs] += "copy_sources" |
| 63 | |
| 64 | do_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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 75 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 76 | install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd |
| 77 | fi |
| 78 | } |