pkgname: sudo pkgver: '1.9.17p2' pkgrel: '3' pkgdesc: 'Give certain users (or groups) the ability to run some commands as root.' url: 'https://www.sudo.ws' arch: x86_64 depends: [] makedepends: - pam source: - 'https://www.sudo.ws/dist/${pkgname}-${pkgver}.tar.gz' sha256sums: - 4a38a1ab3adb1199257edc2a7c4a2bd714665eb605b04368843b06dada2cfcfb build: | cd ${pkgname}-${pkgver} sed -e 's/\([->.a-zA-Z_]*\)->length/ASN1_STRING_length(\1)/' \ -i lib/iolog/hostcheck.c sed -e '/^pre-install:/{N;s@;@ -a -r $(sudoersdir)/sudoers;@}' \ -i plugins/sudoers/Makefile.in ./configure --prefix=/usr \ --libexecdir=/usr/lib \ --sbindir=/usr/bin \ --docdir=/usr/share/doc/sudo \ --with-all-insults \ --with-env-editor \ --without-sendmail \ --with-passprompt="[sudo] password for %p: " make make DESTDIR=${PKGDIR} install ln -sfv libsudo_util.so.0.0.0 ${PKGDIR}/usr/lib/sudo/libsudo_util.so.0 mkdir -pv ${PKGDIR}/etc/pam.d cat > ${PKGDIR}/etc/pam.d/sudo << "EOF" && # Begin /etc/pam.d/sudo # include the default auth settings auth include system-auth # include the default account settings account include system-account # Set default environment variables for the service user session required pam_env.so # include system session defaults session include system-session # End /etc/pam.d/sudo EOF chmod 644 ${PKGDIR}/etc/pam.d/sudo echo "Defaults secure_path=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"" >> ${PKGDIR}/etc/sudoers echo "%wheel ALL=(ALL) ALL" >> ${PKGDIR}/etc/sudoers package: | true