Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Delayed job execution and batch processing" |
| 2 | HOMEPAGE = "http://blog.calhariz.com/" |
| 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" |
| 8 | DEPENDS = "flex flex-native bison-native \ |
| 9 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" |
| 10 | |
| 11 | PACKAGECONFIG ?= "\ |
| 12 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ |
| 13 | " |
| 14 | |
| 15 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux," |
| 16 | |
| 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 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 25 | SRC_URI = "http://software.calhariz.com/at/${BPN}_${PV}.orig.tar.gz \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 40 | SRC_URI[sha256sum] = "aabe6e5cb6dd19fe9fb25c2747492f2db38762b95ea41b86f949609c39fb55c4" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 41 | |
| 42 | EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \ |
| 43 | --with-daemon_username=root \ |
| 44 | --with-daemon_groupname=root \ |
| 45 | --with-jobdir=/var/spool/at/jobs \ |
| 46 | --with-atspool=/var/spool/at/spool \ |
| 47 | ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} " |
| 48 | |
| 49 | inherit autotools-brokensep systemd update-rc.d |
| 50 | |
| 51 | INITSCRIPT_NAME = "atd" |
| 52 | INITSCRIPT_PARAMS = "defaults" |
| 53 | |
| 54 | SYSTEMD_SERVICE_${PN} = "atd.service" |
| 55 | |
| 56 | copy_sources() { |
| 57 | cp -f ${WORKDIR}/posixtm.[ch] ${S} |
| 58 | } |
| 59 | do_patch[postfuncs] += "copy_sources" |
| 60 | |
| 61 | do_install () { |
| 62 | oe_runmake -e "IROOT=${D}" install |
| 63 | |
| 64 | install -d ${D}${sysconfdir}/init.d |
| 65 | install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd |
| 66 | |
| 67 | # install systemd unit files |
| 68 | install -d ${D}${systemd_unitdir}/system |
| 69 | install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system |
| 70 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service |
| 71 | |
| 72 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then |
| 73 | install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd |
| 74 | fi |
| 75 | } |