1*8460358cSPatrick Williamsrequire sudo.inc
2*8460358cSPatrick Williams
3*8460358cSPatrick WilliamsSRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \
4*8460358cSPatrick Williams ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
5*8460358cSPatrick Williams file://0001-sudo.conf.in-fix-conflict-with-multilib.patch \
6*8460358cSPatrick Williams "
7*8460358cSPatrick Williams
8*8460358cSPatrick WilliamsPAM_SRC_URI = "file://sudo.pam"
9*8460358cSPatrick Williams
10*8460358cSPatrick WilliamsSRC_URI[sha256sum] = "976aa56d3e3b2a75593307864288addb748c9c136e25d95a9cc699aafa77239c"
11*8460358cSPatrick Williams
12*8460358cSPatrick WilliamsDEPENDS += " virtual/crypt ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
13*8460358cSPatrick WilliamsRDEPENDS:${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
14*8460358cSPatrick Williams
15*8460358cSPatrick WilliamsCACHED_CONFIGUREVARS = " \
16*8460358cSPatrick Williams ac_cv_type_rsize_t=no \
17*8460358cSPatrick Williams ac_cv_path_MVPROG=${base_bindir}/mv \
18*8460358cSPatrick Williams ac_cv_path_BSHELLPROG=${base_bindir}/sh \
19*8460358cSPatrick Williams ac_cv_path_SENDMAILPROG=${sbindir}/sendmail \
20*8460358cSPatrick Williams ac_cv_path_VIPROG=${base_bindir}/vi \
21*8460358cSPatrick Williams "
22*8460358cSPatrick Williams
23*8460358cSPatrick WilliamsEXTRA_OECONF += " \
24*8460358cSPatrick Williams ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
25*8460358cSPatrick Williams ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${nonarch_libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
26*8460358cSPatrick Williams --with-rundir=/run/sudo \
27*8460358cSPatrick Williams --with-vardir=/var/lib/sudo \
28*8460358cSPatrick Williams --libexecdir=${libdir} \
29*8460358cSPatrick Williams "
30*8460358cSPatrick Williams
31*8460358cSPatrick Williamsdo_install:append () {
32*8460358cSPatrick Williams if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
33*8460358cSPatrick Williams install -D -m 644 ${UNPACKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
34*8460358cSPatrick Williams if ${@bb.utils.contains('PACKAGECONFIG', 'pam-wheel', 'true', 'false', d)} ; then
35