# $Id: PKGBUILD,v 1.41 2006/10/24 16:31:18 tpowa Exp $ # Maintainer: judd pkgname=shadow pkgver=4.0.18.1 pkgrel=4 pkgdesc="Shadow password file utilities" arch=(i686 x86_64) #url='http://shadow.pld.org.pl' # Broken license=('custom') backup=(etc/login.defs etc/pam.d/{chage,login,passwd,shadow,useradd,usermod,userdel} etc/pam.d/{chpasswd,newusers,groupadd,groupdel,groupmod} etc/default/useradd) depends=('pam') # official sources are MIA # ftp://ftp.pld.org.pl/software/$pkgname/$pkgname-$pkgver.tar.bz2 source=("http://www.diy-linux.org/downloads/thirdparty/shadow-${pkgver}.tar.bz2" login passwd useradd login.defs adduser shadow.cron.daily xstrdup.patch shadow-UID_GID.patch) install='shadow.install' md5sums=('e7751d46ecf219c07ae0b028ab3335c6' '76a759c07104fcd0708fcf91337961b5' 'b84204ab731bd02dca49d0637d44ebec' 'a31374fef2cba0ca34dfc7078e2969e4' '640cdc998d996152155905dbbaf22b6d' '0365b9983675df485280fe5f570411f1' '1d64b4113e1d402746d9dd65f28a2c6f' 'a57478bc078f94c0884dfcd50e1939eb' 'dd72bf6dd1253ed6f338eb16dc0abdc5') build() { cd "$startdir"/src/$pkgname-$pkgver patch -Np1 -i ../xstrdup.patch || return 1 patch -Np1 -i ../shadow-UID_GID.patch || return 1 # supress etc/pam.d/*, we provide our own sed -i '/^SUBDIRS/s/pam.d//' etc/Makefile.in ./configure \ --prefix=/usr --libdir=/usr/lib \ --mandir=/usr/man --sysconfdir=/etc \ --enable-shared --with-libpam --without-selinux make || return 1 make DESTDIR="$startdir"/pkg install # license install -v -D -m644 COPYING "$startdir"/pkg/usr/share/licenses/shadow/COPYING # interactive useradd install -v -D -m755 ../adduser "$startdir"/pkg/usr/sbin/adduser # cron job install -v -D -m744 ../shadow.cron.daily "$startdir"/pkg/etc/cron.daily/shadow # login.defs install -v -D -m644 ../login.defs "$startdir"/pkg/etc/login.defs # PAM config local file for file in login passwd; do install -v -D -m644 ../$file "$startdir"/pkg/etc/pam.d/$file done # we use the 'useradd' PAM file for other similar utilities for file in chage chpasswd chfn groupadd groupdel groupmod \ newusers shadowuseradd usermod userdel; do install -v -D -m644 ../useradd "$startdir"/pkg/etc/pam.d/$file done # useradd defaults cat > "$startdir"/pkg/etc/default/useradd <<_EOF # useradd defaults file GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/bash #SKEL=/etc/skel _EOF cd "$startdir"/pkg # Remove su - using su from coreutils instead rm -v bin/su find usr/man -name 'su.1' -exec rm -v {} \; # Move shared libs to /lib mkdir -pv lib mv -v usr/lib/libshadow.so.* lib/ ln -svf ../../lib/libshadow.so.0 usr/lib/libshadow.so find "$startdir"/pkg -name "*.la" -exec rm -v {} \; }