# Maintainer: Natanael Copa pkgname=sudo pkgver=1.8.11_p2 if [ "${pkgver%_*}" != "$pkgver" ]; then _realver=${pkgver%_*}${pkgver#*_} else _realver=$pkgver fi pkgrel=0 pkgdesc="Give certain users the ability to run some commands as root" url="http://www.sudo.ws/sudo/" arch="all" license='custom ISC' makedepends="zlib-dev bash" depends= subpackages="$pkgname-doc $pkgname-dev" source="ftp://ftp.sudo.ws/pub/sudo/$pkgname-$_realver.tar.gz fix-cross-compile.patch libcrypt.patch domain.patch" options="suid" _builddir="$srcdir"/$pkgname-$_realver prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --libexecdir=/usr/lib \ --with-env-editor \ --without-pam \ --without-skey \ --with-passprompt="[sudo] password for %p: " \ || return 1 make || return 1 } package() { cd "$_builddir" # the sudo's mkinstalldir script miscreates the leading # path components with bad permissions. fix this. install -d -m0755 "$pkgdir"/var "$pkgdir"/var/db || return 1 make -j1 DESTDIR="$pkgdir" install || return 1 rm "$pkgdir"/usr/lib/sudo/*.la } md5sums="84012b4871b6c775c957cd310d5bad87 sudo-1.8.11p2.tar.gz 91e1a494af992cc9e598f8bb715a13c9 fix-cross-compile.patch 048e1cc360537bcea5b74a874fd41674 libcrypt.patch 2cfe0d309d42e7278bea325059b48eb5 domain.patch" sha256sums="8133849418fa18cf6b6bb6893d1855ff7afe21db8923234a00bf045c90fba1ad sudo-1.8.11p2.tar.gz 7683c69c977b276882922b826b9166bc0ec8c82e1ca8c97d6d93f4738c0c6a5e fix-cross-compile.patch d26dc7aaa958d988bbb7efaa0118d23e06375cc90868d14d4b2620f55589cb41 libcrypt.patch 1f455dc37a88089017d580a66e805c3e2ad144f16a304ee457b6cfa8668d18dd domain.patch" sha512sums="fdd6c14c3738cb7bafec9873c49f96270fdd36c72d14d3fc7e1ef3651275961bf17550ac1f56ed445b394985cbbf602b88f52cda1226e9007bed14a4d4fadbaa sudo-1.8.11p2.tar.gz 4da8baf526dc7b7dac5cc067e52d5ae464b82337ac5d520641b3d93af2cfa4f2d3897f4e6602f988a194b7260e3edea9c57ccfc07a3eed7e9967956851997950 fix-cross-compile.patch 5ad20254aa587ef615f794081ecd55344eada5cf8c1a1d7956cc3f73375554716c483eeb74081da9a8501afce92cfbaf2abe59d1067aac67ce6e4874eb5a23e1 libcrypt.patch 66c724d8e062745be669625dfdf08ee78e04b8b1f28ae61f49d38a952e52045229bbe3d9e0ecfe8e00d1a53db082488198054d23377bf11706bfbefd59068d3d domain.patch"