PKGBUILD 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
  2. # Contributor: Allan McRae <allan@archlinux.org>
  3. # Contributor: Tom Newsom <Jeepster@gmx.co.uk>
  4. pkgname=sudo
  5. _sudover=1.8.25p1
  6. pkgver=${_sudover/p/.p}
  7. pkgrel=1
  8. pkgdesc="Give certain users the ability to run some commands as root"
  9. arch=('x86_64' 'ppc64le')
  10. url="https://www.sudo.ws/sudo/"
  11. license=('custom')
  12. groups=('base-devel')
  13. depends=('glibc' 'libgcrypt' 'pam' 'libldap')
  14. backup=('etc/sudoers' 'etc/pam.d/sudo')
  15. install=$pkgname.install
  16. source=(https://www.sudo.ws/sudo/dist/$pkgname-$_sudover.tar.gz{,.sig}
  17. sudo.pam)
  18. sha256sums=('9dc99c7a7d37a0ab938410995c133e15d6afb970c2c66f9264fe36d20c89195b'
  19. 'SKIP'
  20. 'd1738818070684a5d2c9b26224906aad69a4fea77aabd960fc2675aee2df1fa2')
  21. validpgpkeys=('59D1E9CCBA2B376704FDD35BA9F4C021CEA470FB')
  22. prepare() {
  23. cd "$srcdir/$pkgname-$_sudover"
  24. }
  25. build() {
  26. cd "$srcdir/$pkgname-$_sudover"
  27. ./configure \
  28. --prefix=/usr \
  29. --sbindir=/usr/bin \
  30. --libexecdir=/usr/lib \
  31. --with-rundir=/run/sudo \
  32. --with-vardir=/var/db/sudo \
  33. --with-logfac=auth \
  34. --enable-gcrypt \
  35. --enable-tmpfiles.d \
  36. --with-pam \
  37. --with-sssd \
  38. --with-ldap \
  39. --with-ldap-conf-file=/etc/openldap/ldap.conf \
  40. --with-env-editor \
  41. --with-passprompt="[sudo] password for %p: " \
  42. --with-all-insults
  43. make
  44. }
  45. check() {
  46. cd "$srcdir/$pkgname-$_sudover"
  47. make check
  48. }
  49. package() {
  50. cd "$srcdir/$pkgname-$_sudover"
  51. make DESTDIR="$pkgdir" install
  52. # Remove sudoers.dist; not needed since pacman manages updates to sudoers
  53. rm "$pkgdir/etc/sudoers.dist"
  54. # Remove /run/sudo directory; we create it using systemd-tmpfiles
  55. rmdir "$pkgdir/run/sudo"
  56. rmdir "$pkgdir/run"
  57. install -Dm644 "$srcdir/sudo.pam" "$pkgdir/etc/pam.d/sudo"
  58. install -Dm644 doc/LICENSE "$pkgdir/usr/share/licenses/sudo/LICENSE"
  59. }
  60. # vim:set ts=2 sw=2 et: