pkgname=sudo pkgver=1.9.16p2 pkgrel=1 pkgdesc="Give certain users the ability to run some commands as root" arch=('x86_64') url="https://www.sudo.ws/sudo/" license=('custom') groups=('base-devel') depends=('glibc' 'linux-pam' 'libldap' 'openssl' 'zlib') backup=(etc/pam.d/sudo etc/sudo.conf etc/sudo_logsrvd.conf etc/sudoers) source=(https://www.sudo.ws/dist/${pkgname}-${pkgver}.tar.gz sudo.pam) sha256sums=(976aa56d3e3b2a75593307864288addb748c9c136e25d95a9cc699aafa77239c 90c6d037bd146aa8f5377ee1081373521cc61a0a544589b6d865fa4ac46ed839) build() { cd ${pkgname}-${pkgver} local configure_args=( --libexecdir=/usr/lib64 --with-secure-path --with-env-editor --with-pam --with-sssd --with-ldap --with-all-insults --with-passprompt="[sudo] password for %p: " --with-secure-path-value=/usr/sbin:/usr/bin --docdir=/usr/share/doc/${pkgname}-${pkgver} ${configure_options} ) ./configure ${configure_args[@]} make } package() { cd ${pkgname}-${pkgver} make DESTDIR=${pkgdir} install # Remove sudoers.dist; not needed since pacman manages updates to sudoers rm ${pkgdir}/etc/sudoers.dist rm -rf ${pkgdir}/run install -Dm644 ${srcdir}/sudo.pam ${pkgdir}/etc/pam.d/sudo sed -i '125s/^# //' ${pkgdir}/etc/sudoers }