blob: ea32c22435fb7b43a116eae8bd7a7368696e5381 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/bin/bash
DEPS=(pam acl audit libcap libxcrypt)
PKG_VER=4.10
SOURCE=https://github.com/shadow-maint/shadow/releases/download/v$PKG_VER/shadow-$PKG_VER.tar.xz
DESC="Password and account management tool suite with support for shadow files and PAM"
patch () {
curl https://www.linuxfromscratch.org/patches/lfs/development/shadow-$PKG_VER-useradd_segfault-1.patch > shadow-$PKG_VER-useradd_segfault-1.patch
patch -Np1 -i shadow-$PKG_VER-useradd_segfault-1.patch
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 SHA512:' \
-e 's:/var/spool/mail:/var/mail:' \
-e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
-i etc/login.defs
sed -e "224s/rounds/min_rounds/" -i libmisc/salt.c
mkdir -p $PKG_DEST/usr/bin
touch $PKG_DEST/usr/bin/passwd
}
build () {
./configure --sysconfdir=/etc --with-group-name-max-length=32
make
}
package () {
make exec_prefix=/usr DESTDIR=$PKG_DEST install
make DESTDIR=$PKG_DEST -C man install-man
mkdir -p $PKG_DEST/etc/default
}
|