1 # Template file for 'shadow'
5 build_style=gnu-configure
6 configure_args="--bindir=/usr/bin --sbindir=/usr/bin
7 --libdir=/usr/lib --enable-shared --disable-static
8 --with-libpam --without-selinux --with-acl --with-attr
9 --disable-nls --enable-subordinate-ids"
10 hostmakedepends="automake gettext-devel libtool"
11 makedepends="acl-devel pam-devel"
13 short_desc="Shadow password file utilities"
14 maintainer="Juan RP <xtraeme@voidlinux.eu>"
15 license="BSD-3-Clause"
16 homepage="https://github.com/shadow-maint/shadow"
17 distfiles="${homepage}/releases/download/${version}/shadow-${version}.tar.xz"
18 checksum=0998c8d84242a231ab0acb7f8613927ff5bcff095f8aa6b79478893a03f05583
19 conf_files="/etc/pam.d/* /etc/default/* /etc/login.defs"
24 case "$XBPS_TARGET_MACHINE" in
25 # Completely disable unportable ruserok().
26 *-musl) sed '/RUSEROK/d' -i configure;;
31 # Don't install groups(1), we use the one from coreutils.
32 sed -i 's/groups$(EXEEXT) //' src/Makefile
33 for f in $(find man -name Makefile); do
34 sed -i 's/groups\.1 / /' $f
40 mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
42 # Install our pam files not the ones supplied with shadow.
43 rm -f ${DESTDIR}/etc/pam.d/*
44 for f in chage passwd; do
45 install -m644 ${FILESDIR}/${f}.pam ${DESTDIR}/etc/pam.d/${f}
47 for f in chpasswd chgpasswd groupadd groupdel groupmems \
48 groupmod newusers useradd userdel usermod; do
49 install -m644 $DESTDIR/etc/pam.d/chage $DESTDIR/etc/pam.d/${f}
51 install -m644 ${FILESDIR}/login.defs ${DESTDIR}/etc
53 # Disable creating mailbox files by default.
54 sed -i -e 's/yes/no/' $DESTDIR/etc/default/useradd
55 # Change default group to the users gid (100).
56 sed -i -e 's/^\(GROUP\)=\(.*\)$/\1=100/' ${DESTDIR}/etc/default/useradd
58 chmod 644 ${DESTDIR}/etc/default/useradd
60 # Install the cron daily job.
61 install -Dm744 ${FILESDIR}/shadow.cron-daily \
62 ${DESTDIR}/etc/cron.daily/shadow
64 # Remove groups.1 manpage provided by coreutils.
65 rm -f ${DESTDIR}/usr/share/man/man1/groups.1
67 # Remove utilities provided by util-linux and logoutd.
68 mv ${DESTDIR}/usr/bin/{newgrp,sg}
71 $DESTDIR/usr/bin/{login,su,chsh,chfn} \
72 $DESTDIR/usr/bin/{nologin,logoutd,vipw,vigr}
74 # ...and their many man pages
75 find $DESTDIR/usr/share/man \
76 '(' -name 'chsh.1' -o \
82 -name 'logoutd.8' -o \
83 -name 'nologin.8' -o \
84 -name 'newgrp.1' ')' \
87 vlicense $FILESDIR/LICENSE