Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | require sudo.inc |
| 2 | |
| 3 | SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ |
| 4 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ |
| 5 | file://0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch \ |
| 6 | file://0001-Include-sys-types.h-for-id_t-definition.patch \ |
| 7 | " |
| 8 | |
| 9 | PAM_SRC_URI = "file://sudo.pam" |
| 10 | |
| 11 | SRC_URI[md5sum] = "93dbd1e47c136179ff1b01494c1c0e75" |
| 12 | SRC_URI[sha256sum] = "a8a697cbb113859058944850d098464618254804cf97961dee926429f00a1237" |
| 13 | |
| 14 | DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" |
| 15 | RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}" |
| 16 | |
| 17 | EXTRA_OECONF += " \ |
| 18 | ac_cv_type_rsize_t=no \ |
| 19 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ |
| 20 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \ |
| 21 | " |
| 22 | |
| 23 | do_install_append () { |
| 24 | if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame^] | 25 | install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | fi |
| 27 | |
| 28 | chmod 4111 ${D}${bindir}/sudo |
| 29 | chmod 0440 ${D}${sysconfdir}/sudoers |
| 30 | |
| 31 | # Explicitly remove the ${localstatedir}/run directory to avoid QA error |
| 32 | rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo |
| 33 | } |
| 34 | |
| 35 | FILES_${PN} += "${libdir}/tmpfiles.d" |
| 36 | FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la" |