blob: 61961cb14dc23dc41f0b5820a366fb40ef007052 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
#!/bin/mkpkg
# description: Shadow password file utilities
# url: https://github.com/shadow-maint/shadow
name=shadow
version=4.20.3
release=1
depends=(acl attr)
makedeps=()
source=(https://github.com/shadow-maint/$name/releases/download/$version/$name-$version.tar.xz)
sha256sums=(
"623be9429f64fa2165bfc5957c6a642ec309c5cf23c0d53855c99f7591922297"
)
build() {
cd $name-$version
# Fix ENCRYPT_METHOD and mail spool path
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
# Disable building groups(1) — we use the coreutils version
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 / /' {} \;
./configure \
--prefix=/ \
--bindir=/bin \
--sbindir=/sbin \
--libdir=/lib \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--disable-static \
--disable-nls \
--without-libpam \
--without-libbsd \
--without-selinux \
--without-audit \
--disable-logind \
--without-yescrypt \
--with-group-name-max-length=32
make
make DESTDIR=$PKG install
# Install login.defs
install -d $PKG/etc
install -m 644 etc/login.defs $PKG/etc/login.defs
# Create required directories
install -d $PKG/var/mail
install -d $PKG/etc/default
# Default useradd config
cat > $PKG/etc/default/useradd << "EOF"
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/sh
SKEL=/etc/skel
CREATE_MAIL_SPOOL=no
EOF
}
signify() {
untrusted comment: public key
RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}
# vim: filetype=sh
|