diff options
author | root <root@rshg054.dnsready.net> | 2012-02-14 23:14:55 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-02-14 23:14:55 +0000 |
commit | 812b715ebd89fb9049df7000c721990084b525c6 (patch) | |
tree | 28d43e6e6913a90b83f44660108e44f7353d8c82 /testing/shadow/PKGBUILD | |
parent | 16e845de1bbf76ab48a02bfaa21730f45e6afaaa (diff) |
Tue Feb 14 23:14:55 UTC 2012
Diffstat (limited to 'testing/shadow/PKGBUILD')
-rw-r--r-- | testing/shadow/PKGBUILD | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/testing/shadow/PKGBUILD b/testing/shadow/PKGBUILD new file mode 100644 index 000000000..7409f0f9f --- /dev/null +++ b/testing/shadow/PKGBUILD @@ -0,0 +1,116 @@ +# $Id: PKGBUILD 150166 2012-02-14 01:55:53Z dreisner $ +# Maintainer: Dave Reisner <dreisner@archlinux.org> +# Maintainer: Aaron Griffin <aaron@archlinux.org> + +pkgname=shadow +pkgver=4.1.5 +pkgrel=2 +pkgdesc="Password and account management tool suite with support for shadow files and PAM" +arch=('i686' 'x86_64') +url='http://pkg-shadow.alioth.debian.org/' +license=('BSD') +groups=('base') +depends=('bash' 'pam' 'acl') +backup=(etc/login.defs + etc/pam.d/{chage,login,passwd,shadow,useradd,usermod,userdel} + etc/pam.d/{chpasswd,newusers,groupadd,groupdel,groupmod} + etc/pam.d/{chfn,chgpasswd,groupmems,chsh} + etc/default/useradd) +options=('!libtool') +install='shadow.install' +source=("http://pkg-shadow.alioth.debian.org/releases/$pkgname-$pkgver.tar.bz2"{,.sig} + LICENSE + adduser + chgpasswd + chpasswd + defaults.pam + login + login.defs + newusers + passwd + shadow.cron.daily + useradd.defaults + xstrdup.patch + shadow-strncpy-usage.patch + shadow-add-missing-include.patch) +sha1sums=('3ab1ae0e30af36d04445314fcb5a079bdf05de41' + '0a31aafceb948a91fe7370a6378cafd6fd883145' + '33a6cf1e44a1410e5c9726c89e5de68b78f5f922' + '78ec184a499f9708adcfcf0b7a3b22a60bf39f91' + '4ad0e059406a305c8640ed30d93c2a1f62c2f4ad' + '12427b1ca92a9b85ca8202239f0d9f50198b818f' + '0e56fed7fc93572c6bf0d8f3b099166558bb46f1' + '895aad07c192b288b457e19dd7b8c55841b4ad22' + 'e5cab2118ecb1e61874cde842d7d04d1003f35cb' + '12427b1ca92a9b85ca8202239f0d9f50198b818f' + '611be25d91c3f8f307c7fe2485d5f781e5dee75f' + '5d83ba7e11c765c951867cbe00b0ae7ff57148fa' + '9ae93de5987dd0ae428f0cc1a5a5a5cd53583f19' + '6010fffeed1fc6673ad9875492e1193b1a847b53' + '21e12966a6befb25ec123b403cd9b5c492fe5b16' + '0697a21f7519de30821da7772677035652df4ad2') + +build() { + cd "$pkgname-$pkgver" + + # avoid transitive linking issues with binutils 2.22 + sed -i '/^user\(mod\|add\)_LDADD/s|$| -lattr|' src/Makefile.am + + # link to glibc's crypt(3) + LDFLAGS+=" -lcrypt" + + patch -Np1 <"$srcdir/xstrdup.patch" + patch -Np1 <"$srcdir/shadow-strncpy-usage.patch" + patch -Np1 <"$srcdir/shadow-add-missing-include.patch" + + # supress etc/pam.d/*, we provide our own + sed -i '/^SUBDIRS/s/pam.d//' etc/Makefile.in + + ./configure \ + --prefix=/usr \ + --libdir=/lib \ + --mandir=/usr/share/man \ + --sysconfdir=/etc \ + --with-libpam \ + --without-selinux + + make +} + +package() { + cd "$pkgname-$pkgver" + + make DESTDIR="$pkgdir" install + + # license + install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/shadow/LICENSE" + + # interactive useradd + install -Dm755 "$srcdir/adduser" "$pkgdir/usr/sbin/adduser" + + # useradd defaults + install -Dm644 "$srcdir/useradd.defaults" "$pkgdir/etc/default/useradd" + + # cron job + install -Dm744 "$srcdir/shadow.cron.daily" "$pkgdir/etc/cron.daily/shadow" + + # login.defs + install -Dm644 "$srcdir/login.defs" "$pkgdir/etc/login.defs" + + # PAM config - custom + install -dm755 "$pkgdir/etc/pam.d" + install -t "$pkgdir/etc/pam.d" -m644 "$srcdir"/{login,passwd,chgpasswd,chpasswd,newusers} + + # PAM config - from tarball + install -Dm644 etc/pam.d/groupmems "$pkgdir/etc/pam.d/groupmems" + + # we use the 'useradd' PAM file for other similar utilities + for file in chage chfn chsh groupadd groupdel groupmod shadow \ + useradd usermod userdel; do + install -Dm644 "$srcdir/defaults.pam" "$pkgdir/etc/pam.d/$file" + done + + # Remove su - using su from coreutils instead + rm "$pkgdir/bin/su" + find "$pkgdir/usr/share/man" -name 'su.1' -delete +} |