void-packages/srcpkgs/shadow/template

100 lines
2.8 KiB
Bash
Raw Normal View History

# Template file for 'shadow'
pkgname=shadow
2014-08-25 08:54:46 +00:00
version=4.2.1
2015-03-18 06:57:46 +00:00
revision=8
build_pie=yes
build_style=gnu-configure
2012-07-09 13:50:23 +00:00
configure_args="--bindir=/usr/bin --sbindir=/usr/sbin
--libdir=/usr/lib --enable-shared --disable-static
2014-04-22 11:48:47 +00:00
--with-libpam --without-selinux --with-acl --with-attr
--disable-nls --enable-subordinate-ids ac_cv_id32bit=yes"
2014-08-25 08:54:46 +00:00
hostmakedepends="automake libtool gettext-devel"
2014-04-22 10:50:16 +00:00
makedepends="acl-devel pam-devel>=1.1.8_4"
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/defaults/useradd
/etc/login.defs"
short_desc="Shadow password file utilities"
maintainer="Juan RP <xtraeme@gmail.com>"
2012-02-06 09:10:43 +00:00
license="BSD"
2012-07-02 07:17:03 +00:00
homepage="http://pkg-shadow.alioth.debian.org"
2014-08-25 08:54:46 +00:00
distfiles="http://pkg-shadow.alioth.debian.org/releases/$pkgname-$version.tar.xz"
checksum=3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41
2014-01-11 16:05:51 +00:00
pre_configure() {
2014-08-25 08:54:46 +00:00
autoreconf -fi
2014-01-11 16:05:51 +00:00
case "$XBPS_TARGET_MACHINE" in
# Completely disable unportable ruserok().
*-musl) sed '/RUSEROK/d' -i configure;;
esac
}
2013-10-28 14:58:40 +00:00
do_build() {
# Don't install groups(1), we use the one from coreutils.
sed -i 's/groups$(EXEEXT) //' src/Makefile
for f in $(find man -name Makefile); do
sed -i 's/groups\.1 / /' $f
done
make ${makejobs}
}
2012-01-22 20:02:45 +00:00
post_install() {
# Install our pam files not the ones supplied with shadow.
rm -f ${DESTDIR}/etc/pam.d/*
for f in chage passwd; do
install -m644 ${FILESDIR}/${f}.pam ${DESTDIR}/etc/pam.d/${f}
done
for f in chpasswd chgpasswd groupadd groupdel groupmems \
groupmod newusers useradd userdel usermod; do
install -m644 $DESTDIR/etc/pam.d/chage $DESTDIR/etc/pam.d/${f}
done
install -m644 ${FILESDIR}/login.defs ${DESTDIR}/etc
# Disable creating mailbox files by default.
sed -i -e 's/yes/no/' $DESTDIR/etc/default/useradd
# Change default group to the users gid (100).
sed -i -e 's/^\(GROUP\)=\(.*\)$/\1=100/' ${DESTDIR}/etc/default/useradd
2014-09-22 11:25:15 +00:00
chmod 644 ${DESTDIR}/etc/default/useradd
# Install the cron daily job.
install -Dm744 ${FILESDIR}/shadow.cron-daily \
${DESTDIR}/etc/cron.daily/shadow
2012-11-17 20:38:57 +00:00
# Remove groups.1 manpage provided by coreutils.
rm -f ${DESTDIR}/usr/share/man/man1/groups.1
2012-11-17 20:38:57 +00:00
# Remove utilities provided by util-linux and logoutd.
2015-02-22 11:03:15 +00:00
mv ${DESTDIR}/usr/bin/{newgrp,sg}
rm \
2015-02-22 11:03:15 +00:00
$DESTDIR/usr/bin/{login,su,chsh,chfn} \
$DESTDIR/usr/sbin/{nologin,logoutd,vipw,vigr}
# ...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 20:38:57 +00:00
-name 'logoutd.8' -o \
-name 'nologin.8' -o \
-name 'newgrp.1' ')' \
-delete
vlicense $FILESDIR/LICENSE
}