aports

Custom Alpine Linux aports

git clone https://git.8pit.net/aports.git

 1# Contributor: Rasmus Thomsen <oss@cogitri.dev>
 2# Contributor: Natanael Copa <ncopa@alpinelinux.org>
 3# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
 4pkgname=linux-pam
 5pkgver=1.6.1
 6pkgrel=2
 7pkgdesc="Linux PAM (Pluggable Authentication Modules for Linux)"
 8url="https://www.kernel.org/pub/linux/libs/pam"
 9arch="all"
10license="BSD-3-Clause"
11depends_dev="gettext-dev"
12makedepends="
13	$depends_dev
14	autoconf
15	automake
16	bison
17	flex-dev
18	libtool
19	linux-headers
20	"
21options="suid !check"
22subpackages="$pkgname-dev $pkgname-manual::noarch $pkgname-doc"
23source="https://github.com/linux-pam/linux-pam/releases/download/v$pkgver/Linux-PAM-$pkgver.tar.xz
24	https://github.com/linux-pam/linux-pam/releases/download/v$pkgver/Linux-PAM-$pkgver-docs.tar.xz
25
26	base-auth.pamd
27	base-account.pamd
28	base-password.pamd
29	base-session.pamd
30	base-session-noninteractive.pamd
31	other.pamd
32	login.pamd
33	su.pamd
34	"
35builddir="$srcdir"/Linux-PAM-$pkgver
36
37# secfixes:
38#   1.6.0-r0:
39#     - CVE-2024-22365
40#   1.5.1-r0:
41#     - CVE-2020-27780
42
43build() {
44	./configure \
45		--build=$CBUILD \
46		--host=$CHOST \
47		--prefix=/usr \
48		--libdir=/usr/lib \
49		--sysconfdir=/etc \
50		--mandir=/usr/share/man \
51		--infodir=/usr/share/info \
52		--localstatedir=/var \
53		--disable-nls \
54		--disable-db \
55		--disable-examples
56	make
57}
58
59package() {
60	make DESTDIR="$pkgdir" install
61
62	# install our pam.d files
63	install -Dm644 "$srcdir"/base-auth.pamd "$pkgdir"/etc/pam.d/base-auth
64	install -Dm644 "$srcdir"/base-password.pamd "$pkgdir"/etc/pam.d/base-password
65	install -Dm644 "$srcdir"/base-account.pamd "$pkgdir"/etc/pam.d/base-account
66	install -Dm644 "$srcdir"/base-session.pamd "$pkgdir"/etc/pam.d/base-session
67	install -Dm644 "$srcdir"/base-session-noninteractive.pamd \
68		"$pkgdir"/etc/pam.d/base-session-noninteractive
69	install -Dm644 "$srcdir"/other.pamd "$pkgdir"/etc/pam.d/other
70	install -Dm644 "$srcdir"/login.pamd "$pkgdir"/etc/pam.d/login
71	install -Dm644 "$srcdir"/su.pamd "$pkgdir"/etc/pam.d/su
72
73	# make "unix_chkpwd" shadow group and enable g+s
74	chgrp shadow "$pkgdir"/sbin/unix_chkpwd \
75		&& chmod g+s "$pkgdir"/sbin/unix_chkpwd
76
77	# we don't ship systemd
78	rm -r "$pkgdir"/usr/lib/systemd
79}
80
81manual() {
82	pkgdesc="$pkgdesc (manual)"
83
84	amove usr/share/doc/Linux-PAM
85}
86
87sha512sums="
88ddb5a5f296f564b76925324550d29f15d342841a97815336789c7bb922a8663e831edeb54f3dcd1eaf297e3325c9e2e6c14b8740def5c43cf3f160a8a14fa2ea  Linux-PAM-1.6.1.tar.xz
89c6054ec6832f604c0654cf074e4e241c44037fd41cd37cca7da94abe008ff72adc4466d31bd254517eda083c7ec3f6aefd37785b3ee3d0d4553250bd29963855  Linux-PAM-1.6.1-docs.tar.xz
90988e4ba32fe6b7adeb4898c784eb40d6f88f3fca78ead82b61686f0e1597f306abb3ee338aa2e4cf2db0191b8c1a7e319332e7f6d6aed3ab381f71c0a3355de9  base-auth.pamd
915d3e960ead44dcb2b3f732825482eefab9a9ffa4d4d5fc1d30cbf2fe8c5c896f1114a0ad3a6c606fa9fbf5c43400388f4ee8d7fca8110721eabfc9691004756b  base-account.pamd
92b3a900d6067ba04faa8016d9408da75917e8c0502020a4048bba1de2ca54c705c4d5f8307e759080fd5a9d5f3522f52a708803f1f01627eac56d9d7c6d363d13  base-password.pamd
93d963071b93c1178a15142db1929bd8cc5c46654fa68e299c4bcf1d4325adbc541195df7c034221daf6cc7f8937d771b5707acbdd36eee98a36180ee07529138d  base-session.pamd
942f18114b8a6a78ed798646962526876f3536b4759c00dce339e21f0695ea71d0917c048dc852c3d1c79bd17cd19dc513a3c6463abaffcff3f792b906cec98ede  base-session-noninteractive.pamd
95299bb3791652174a4d836d60f146200bb692ad80c20c18e6e872543ac8885156ff1a7ca00acaf55b89672fa98f00b8df53879c9ab1913a9cc91f620163dd50be  other.pamd
96ae3a807bc121eb59b54f5e53ff8efdde972610cf7463b6a38bccbc89b49954aa2e0a8693919b01f8bc7a956ba58c97de34a28963bc14f526b70b3073d64427b5  login.pamd
97a71ac72a21a5d18612365b2b0a4a0da1f9d1101a30d3f5d97f479f6378c3a0fbc219617000448c8b5a0ab2597f2e4944202b13a69624dbe849bf9ea39d00ca22  su.pamd
98"