upgpkg: sbcl 2.2.11-1
[arch-packages.git] / shadow / repos / core-x86_64 / PKGBUILD
blob7ac89507a9acb0f7d3b79b658549a39414eca1f1
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Dave Reisner <dreisner@archlinux.org>
3 # Contributor: Aaron Griffin <aaron@archlinux.org>
5 pkgname=shadow
6 pkgver=4.12.3
7 pkgrel=2
8 pkgdesc="Password and account management tool suite with support for shadow files and PAM"
9 arch=(x86_64)
10 url="https://github.com/shadow-maint/shadow"
11 license=(BSD)
12 depends=(
13   acl libacl.so
14   attr libattr.so
15   audit libaudit.so
16   glibc
17   libxcrypt libcrypt.so
18   pam libpam.so libpam_misc.so
20 makedepends=(docbook-xsl itstool libcap libxslt)
21 backup=(
22   etc/default/useradd
23   etc/login.defs
24   etc/pam.d/{chage,{,ch,chg}passwd,group{add,del,mems,mod},newusers,shadow,user{add,del,mod}}
26 options=(debug !emptydirs)
27 # NOTE: distribution patches are taken from https://gitlab.archlinux.org/archlinux/packaging/upstream/shadow/-/commits/v4.12.3.arch2
28 source=(
29   https://github.com/shadow-maint/shadow/releases/download/$pkgver/shadow-$pkgver.tar.xz{,.asc}
30   0001-Disable-replaced-tools-and-man-pages.patch
31   0002-Adapt-login.defs-for-PAM-and-util-linux.patch
32   0003-Add-Arch-Linux-defaults-for-login.defs.patch
33   0004-Add-Arch-Linux-defaults-for-etc-pam.d.patch
34   shadow.{timer,service}
35   useradd.defaults
37 sha512sums=('0529889258f54e7634762dc154aa680d55f8c5f1654afadd1b7431cfbb890a3b1ba27c7ff4b7c45986e4ee2289946db2e420b23ed13e4e5b15800a1fb3a013bc'
38             'SKIP'
39             'a0c69c252a8e41b1e3aa4c76cc6c37893a667dd079db9b7bdb54143d4b81f56551b787a93dad6e4adcd532cd12b51c9a5a5a4ae509f7ab5fe732fb9f23f57b5c'
40             'a44f3d71376a39bc7bb9d43290f619964f83184dba938857f5765c439150df2c9ba00f115579a7eeca5b316ea71808e9606c6ba977a41aa7fc4b1675606f1351'
41             'e8418e6d518101be63e7890254f9a0490f94302882689a0b69601186c9f1915831a34bb6998dbc92b753bff3f762793a7ccade66c2bac2d7b7a77d1a861d5cb7'
42             '4e6b1f88ab1e3416ab0633b897ebb1359d422b5c2222f3ed3631732f790c42352d1cbe66fa08f45eb2e1679af8f602a95fcc7f463f1bba94c2414e902a4fa215'
43             'e4edf705dd04e088c6b561713eaa1afeb92f42ac13722bff037aede6ac5ad7d4d00828cfb677f7b1ff048db8b6788238c1ab6a71dfcfd3e02ef6cb78ae09a621'
44             '86c9412e379c0fc97c0eec417340adae990342f35d6663a6a59e8aae2221a5fbfd0437b5892aefd9cf09ef76a970f3a42b20cea051db651475d526eda17a973a'
45             'e9ffea021ee4031b9ad3a534bfb94dbf9d0dfd45a55ecac5dedb2453ea0c17fb80bbb9ad039686bc1f3349dc371977eb548e3a665c56531469c22f29fc4eced8')
46 b2sums=('63b10d75a11d419156a996b8acf1bebbfab28999c2ab796e6625c028882073d4021806d8b56224190886c076a1205955e7797cb6f797ef73af3a8a33ac34bf2f'
47         'SKIP'
48         'f1bf37abe10f554abea4635c62e74c43e09e64181e83d68dd8e2031d44d3a46835c5b4997b04614115a2dbd51a1caa67f7ca70fed623ee7f2916538a8ac85593'
49         'a1cd3ffd50335eee265587a6a8733bc4c6b0d354c6ea90b2dd5d42642d782acc00d690a40e71ba31b56fd374b1619cc05f9dc876b2f6279ff32f95a17bbbbd87'
50         '9715184569ca6769b31c01a58a1c8a0b5bb8099f6c07a888a2e0fab6748ac18eed7dd4297cc98449fd2a123cff6b027ab757d34a4cad113a4d9e5e02b28bb668'
51         'f11abd5dbe0cc4029eb8e7eb101d95f0fbf48550bdab73ebea1f25a5bc9a401713061832bf494d614711d834ab1e79ef14831bc8a2d18b8980fcb2fe7e0fe5c3'
52         '5cfc936555aa2b2e15f8830ff83764dad6e11a80e2a102c5f2bd3b7c83db22a5457a3afdd182e3648c9d7d5bca90fa550f59576d0ac47a11a31dfb636cb18f2b'
53         'be9d8a7424143791e61d61b01c775e3a10dd6b6a1a7af13081bc00e400e880a209240dcceb09c671de41fbdf18373f1195aa8a559cf935122ba5d1312ed8dab2'
54         'd5bea0cfc2e6d3d1749c65440ca911533d41b6f8117fe09e9efec23524637cfa823d230303a7fbb45d3cd251bf8036d48b9b21049ced208f7ed191fcbd75e879')
55 validpgpkeys=(66D0387DB85D320F8408166DB175CFA98F192AF2)  # Serge Hallyn <sergeh@kernel.org>
57 prepare() {
58   local filename
60   cd $pkgname-$pkgver
61   for filename in "${source[@]}"; do
62     if [[ "$filename" =~ \.patch$ ]]; then
63       printf "Applying patch %s\n" "${filename##*/}"
64       patch -Np1 -i "$srcdir/${filename##*/}"
65     fi
66   done
68   autoreconf -fiv
71 build() {
72   local configure_options=(
73     --prefix=/usr
74     --bindir=/usr/bin
75     --sbindir=/usr/bin
76     --libdir=/usr/lib
77     --mandir=/usr/share/man
78     --sysconfdir=/etc
79     --disable-account-tools-setuid
80     --enable-man
81     --with-fcaps
82     --with-libpam
83     --with-group-name-max-length=32
84     --with-audit
85     --with-bcrypt
86     --with-yescrypt
87     --without-selinux
88     --without-su
89   )
91   cd $pkgname-$pkgver
92   ./configure "${configure_options[@]}"
94   # prevent excessive overlinking due to libtool
95   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
96   make
99 package() {
100   cd $pkgname-$pkgver
102   make DESTDIR="$pkgdir" install
103   make DESTDIR="$pkgdir" -C man install
105   # license
106   install -vDm 644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"
108   # custom useradd(8) defaults (not provided by upstream)
109   install -vDm 600 ../useradd.defaults "$pkgdir/etc/default/useradd"
111   # systemd units
112   install -vDm 644 ../shadow.timer -t "$pkgdir/usr/lib/systemd/system/"
113   install -vDm 644 ../shadow.service -t "$pkgdir/usr/lib/systemd/system/"
114   install -vdm 755 "$pkgdir/usr/lib/systemd/system/timers.target.wants"
115   ln -s ../shadow.timer "$pkgdir/usr/lib/systemd/system/timers.target.wants/shadow.timer"