shadow 4.16.0-1
This commit is contained in:
parent
10ee6f2c5c
commit
9b312dd2cb
73
shadow/PKGBUILD
Normal file
73
shadow/PKGBUILD
Normal file
@ -0,0 +1,73 @@
|
||||
# This is an example PKGBUILD file. Use this as a start to creating your own,
|
||||
# and remove these comments. For more information, see 'man PKGBUILD'.
|
||||
# NOTE: Please fill out the license field for your package! If it is unknown,
|
||||
# then please put 'unknown'.
|
||||
|
||||
# Maintainer: Future Linux Team <future_linux@163.com>
|
||||
pkgname=shadow
|
||||
pkgver=4.16.0
|
||||
pkgrel=1
|
||||
pkgdesc="Password and account management tool suite with support for shadow files and PAM"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/shadow-maint/shadow/"
|
||||
license=('BSD-3-Clause')
|
||||
groups=('base')
|
||||
depends=('glibc' 'attr' 'acl' 'libcap' 'libxcrypt')
|
||||
options=('!emptydirs')
|
||||
install=${pkgname}.install
|
||||
source=(https://github.com/shadow-maint/shadow/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz)
|
||||
sha256sums=(b78e3921a95d53282a38e90628880624736bf6235e36eea50c50835f59a3530b)
|
||||
|
||||
prepare() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
sed -i 's/groups$(EXEEXT) //' src/Makefile.in
|
||||
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
|
||||
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
|
||||
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;
|
||||
|
||||
sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD YESCRYPT:' \
|
||||
-e 's:/var/spool/mail:/var/mail:' \
|
||||
-e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
|
||||
-i etc/login.defs
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
export CFLAGS="${CFLAGS} -DEXTRA_CHECK_HOME_DIR"
|
||||
|
||||
${CONFIGURE} \
|
||||
--sysconfdir=/etc \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--disable-static \
|
||||
--with-{b,yes}crypt \
|
||||
--without-libbsd \
|
||||
--with-group-name-max-length=32
|
||||
|
||||
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
make DESTDIR=${pkgdir} install
|
||||
make -C man DESTDIR=${pkgdir} install-man
|
||||
|
||||
install -vdm755 ${pkgdir}/etc/default
|
||||
cat > ${pkgdir}/etc/default/useradd << EOF
|
||||
# useradd defaults file
|
||||
GROUP=999
|
||||
GROUPS=
|
||||
HOME=/home
|
||||
INACTIVE=-1
|
||||
EXPIRE=
|
||||
SHELL=/bin/bash
|
||||
SKEL=/etc/skel
|
||||
USRSKEL=/usr/etc/skel
|
||||
CREATE_MAIL_SPOOL=yes
|
||||
LOG_INIT=yes
|
||||
EOF
|
||||
}
|
17
shadow/shadow.install
Normal file
17
shadow/shadow.install
Normal file
@ -0,0 +1,17 @@
|
||||
# This is a default template for a post-install scriptlet.
|
||||
# Uncomment only required functions and remove any functions
|
||||
# you don't need (and this header).
|
||||
|
||||
post_install() {
|
||||
if [ ! -e etc/gshadow ]; then
|
||||
/usr/sbin/grpconv
|
||||
fi
|
||||
if [ ! -e etc/shadow ]; then
|
||||
/usr/sbin/pwconv
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user