2008-12-16 03:52:12 +01:00
|
|
|
# Template file for 'shadow'
|
|
|
|
pkgname=shadow
|
2012-07-02 09:17:03 +02:00
|
|
|
version=4.1.5.1
|
2013-10-28 15:36:07 +01:00
|
|
|
revision=14
|
2011-10-24 14:14:47 +02:00
|
|
|
build_style=gnu-configure
|
2012-07-09 15:50:23 +02:00
|
|
|
configure_args="--bindir=/usr/bin --sbindir=/usr/sbin
|
2012-11-17 21:31:47 +01:00
|
|
|
--libdir=/usr/lib --enable-shared --disable-static
|
|
|
|
--with-libpam --without-selinux --with-acl --with-attr"
|
2012-05-23 18:26:56 +02:00
|
|
|
makedepends="acl-devel pam-devel"
|
2014-01-01 16:10:11 +01:00
|
|
|
depends="pam"
|
|
|
|
conf_files="
|
|
|
|
/etc/pam.d/usermod
|
|
|
|
/etc/pam.d/userdel
|
|
|
|
/etc/pam.d/useradd
|
|
|
|
/etc/pam.d/passwd
|
|
|
|
/etc/pam.d/newusers
|
|
|
|
/etc/pam.d/groupmod
|
|
|
|
/etc/pam.d/groupmems
|
|
|
|
/etc/pam.d/groupdel
|
|
|
|
/etc/pam.d/groupadd
|
|
|
|
/etc/pam.d/chpasswd
|
|
|
|
/etc/pam.d/chgpasswd
|
|
|
|
/etc/pam.d/chage
|
|
|
|
/etc/pam.d/other
|
|
|
|
/etc/defaults/useradd
|
|
|
|
/etc/login.defs"
|
2008-12-16 03:52:12 +01:00
|
|
|
short_desc="Shadow password file utilities"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2012-02-06 10:10:43 +01:00
|
|
|
license="BSD"
|
2012-07-02 09:17:03 +02:00
|
|
|
homepage="http://pkg-shadow.alioth.debian.org"
|
2014-03-16 12:36:53 +01:00
|
|
|
distfiles="http://pkgs.fedoraproject.org/repo/pkgs/shadow-utils/${pkgname}-${version}.tar.bz2/a00449aa439c69287b6d472191dc2247/${pkgname}-${version}.tar.bz2"
|
2012-07-02 09:17:03 +02:00
|
|
|
checksum=aa32333748d68b58ed3a83625f0165e0f6b9dc4639e6377c9300c6bf4fe978fb
|
2008-12-16 03:52:12 +01:00
|
|
|
|
2013-04-09 01:49:27 +02:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
2013-10-28 15:37:48 +01:00
|
|
|
hostmakedepends="automake libtool gettext-devel"
|
2013-02-11 12:46:45 +01:00
|
|
|
pre_configure() {
|
|
|
|
autoreconf -fi
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
2014-01-11 17:05:51 +01:00
|
|
|
pre_configure() {
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
# Completely disable unportable ruserok().
|
|
|
|
*-musl) sed '/RUSEROK/d' -i configure;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2013-10-28 15:58:40 +01:00
|
|
|
do_build() {
|
2013-10-28 15:36:07 +01:00
|
|
|
# Don't install groups(1), we use the one from coreutils.
|
2009-10-16 01:22:18 +02:00
|
|
|
sed -i 's/groups$(EXEEXT) //' src/Makefile
|
|
|
|
for f in $(find man -name Makefile); do
|
|
|
|
sed -i 's/groups\.1 / /' $f
|
|
|
|
done
|
2013-10-28 15:58:40 +01:00
|
|
|
# Build PIE binaries by default.
|
|
|
|
make CFLAGS+=" -fPIE" LDFLAGS+=" -pie" ${makejobs}
|
2008-12-16 03:52:12 +01:00
|
|
|
}
|
|
|
|
|
2012-01-22 21:02:45 +01:00
|
|
|
post_install() {
|
2009-04-21 17:55:02 +02:00
|
|
|
# Install our pam files not the ones supplied with shadow.
|
|
|
|
rm -f ${DESTDIR}/etc/pam.d/*
|
2012-07-27 10:38:03 +02:00
|
|
|
for f in chage passwd other; do
|
2009-04-21 17:55:02 +02:00
|
|
|
install -m644 ${FILESDIR}/${f}.pam ${DESTDIR}/etc/pam.d/${f}
|
|
|
|
done
|
2008-12-16 03:52:12 +01:00
|
|
|
for f in chpasswd chgpasswd groupadd groupdel groupmems \
|
2012-07-27 10:38:03 +02:00
|
|
|
groupmod newusers useradd userdel usermod; do
|
2009-03-11 06:31:56 +01:00
|
|
|
install -m644 $DESTDIR/etc/pam.d/chage $DESTDIR/etc/pam.d/${f}
|
2008-12-16 03:52:12 +01:00
|
|
|
done
|
2009-04-21 17:55:02 +02:00
|
|
|
install -m644 ${FILESDIR}/login.defs ${DESTDIR}/etc
|
2009-03-28 18:50:38 +01:00
|
|
|
|
2009-04-08 03:22:28 +02:00
|
|
|
# Disable creating mailbox files by default.
|
|
|
|
sed -i -e 's/yes/no/' $DESTDIR/etc/default/useradd
|
2012-07-31 20:57:57 +02:00
|
|
|
# Change default group to the users gid (100).
|
|
|
|
sed -i -e 's/^\(GROUP\)=\(.*\)$/\1=100/' ${DESTDIR}/etc/default/useradd
|
2009-04-08 03:22:28 +02:00
|
|
|
|
2009-03-28 18:50:38 +01:00
|
|
|
# Install the cron daily job.
|
2012-10-05 15:25:51 +02:00
|
|
|
install -Dm744 ${FILESDIR}/shadow.cron-daily \
|
2009-03-28 18:50:38 +01:00
|
|
|
${DESTDIR}/etc/cron.daily/shadow
|
2009-04-21 17:55:02 +02:00
|
|
|
|
2012-11-17 21:38:57 +01:00
|
|
|
# Remove groups.1 manpage provided by coreutils.
|
2009-08-01 10:45:18 +02:00
|
|
|
rm -f ${DESTDIR}/usr/share/man/man1/groups.1
|
2012-07-27 10:38:03 +02:00
|
|
|
|
2012-11-17 21:38:57 +01:00
|
|
|
# Remove utilities provided by util-linux and logoutd.
|
2012-07-27 10:38:03 +02:00
|
|
|
rm \
|
|
|
|
$DESTDIR/usr/bin/{chsh,chfn,sg} \
|
2012-07-27 11:36:17 +02:00
|
|
|
$DESTDIR/usr/bin/{newgrp,login,su} \
|
2013-10-28 15:36:07 +01:00
|
|
|
$DESTDIR/usr/sbin/{nologin,logoutd,vipw,vigr}
|
2012-07-27 10:38:03 +02:00
|
|
|
|
|
|
|
# ...and their many man pages
|
|
|
|
find $DESTDIR/usr/share/man \
|
|
|
|
'(' -name 'chsh.1' -o \
|
|
|
|
-name 'chfn.1' -o \
|
|
|
|
-name 'su.1' -o \
|
|
|
|
-name 'login.1' -o \
|
|
|
|
-name 'vipw.8' -o \
|
|
|
|
-name 'vigr.8' -o \
|
2012-11-17 21:38:57 +01:00
|
|
|
-name 'logoutd.8' -o \
|
2013-10-28 15:36:07 +01:00
|
|
|
-name 'nologin.8' -o \
|
2012-07-27 10:38:03 +02:00
|
|
|
-name 'newgrp.1' ')' \
|
|
|
|
-delete
|
|
|
|
|
|
|
|
vinstall $FILESDIR/LICENSE 644 usr/share/licenses/shadow
|
2008-12-16 03:52:12 +01:00
|
|
|
}
|