aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-pam/APKBUILD
blob: 70a5413e54b755938aec47bfc852f836956db404 (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
78
79
80
81
82
83
84
85
86
87
88
89
90
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=linux-pam
pkgver=1.3.1
pkgrel=2
pkgdesc="Linux PAM (Pluggable Authentication Modules for Linux)"
url="https://www.kernel.org/pub/linux/libs/pam"
arch="all"
license="BSD-3-Clause"
depends_dev="gettext-dev"
makedepends="$depends_dev bison flex-dev autoconf automake libtool"
options="suid !check"
subpackages="$pkgname-dev $pkgname-doc"
source="
	https://github.com/linux-pam/linux-pam/releases/download/v$pkgver/Linux-PAM-$pkgver.tar.xz
	fix-compat.patch
	libpam-fix-build-with-eglibc-2.16.patch
	musl-fix_uint.patch
	musl-fix-pam_exec.patch

	base-auth.pamd
	base-account.pamd
	base-password.pamd
	base-session.pamd
	base-session-noninteractive.pamd
	other.pamd
	system-local-login.pamd
	system-login.pamd
	su.pamd
	"

builddir="$srcdir"/Linux-PAM-$pkgver
prepare() {
	default_prepare
	# disable insecure modules
	sed -e 's/pam_rhosts//g' -i modules/Makefile.am

	autoreconf -vif
}

build() {
	[ "$CLIBC" = "musl" ] && export ac_cv_search_crypt=no
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--libdir=/lib \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-nls \
		--disable-db
	make
}

package() {
	make DESTDIR="$pkgdir" install

	# install our pam.d files
	mkdir "$pkgdir"/etc/pam.d
	for i in $source; do
		case $i in
		*.pamd)
			basename=$(echo $i | cut -d. -f1)
			cp "$srcdir"/$i "$pkgdir"/etc/pam.d/"$basename"
			;;
		esac
	done

	# delete pointless libtool archives.
	chgrp shadow "$pkgdir"/sbin/unix_chkpwd \
		&& chmod g+s "$pkgdir"/sbin/unix_chkpwd
}

sha512sums="6bc8e2a5b64686f0a23846221c5228c88418ba485b17c53b3a12f91262b5bb73566d6b6a5daa1f63bbae54310aee918b987e44a72ce809b4e7c668f0fadfe08e  Linux-PAM-1.3.1.tar.xz
52b97e23084f7b835ce1fa441663f91a50ea797cb38ba2c6662bcdaf0d25ba487118442674ac347fb17353af126dd6b3b696612faa56cac428dd842d14e1c90d  fix-compat.patch
24ec4c755b4034189ea05b1af69269e094964efd745b470a6ccb268e80550b56c96027214e918168aa942aa426bfe0b1487801e95ef2bf0c488f47eb49f1d9e1  libpam-fix-build-with-eglibc-2.16.patch
2bc12415bacdb766c1a8d8aa43c84c17bb2ddc9a9b910d52830259ad18e54465cc077d7b2974a71c40867c90910751339f283731c7298b983acd4ae83d7c98a1  musl-fix_uint.patch
08323428e13f65300d7638233fd8ab25c582a08ffe0a282ed43f69ccb428dea9eb185da3ae9dd2634f021c16592f194f99348758bd9e761c29435652b544f543  musl-fix-pam_exec.patch
ea6a10957ba9ec50d982bfabafb35060426ac797936f874097b4fa7620b89fd2ba3be9757401f9b787956fb23879d8ef73676f7703e75fcef3dca0b9559c4167  base-auth.pamd
85462201a4044c7e170e617d39b0eceb4790abc6c0504999117548030a16d80a9d2078d1ad97690d7d346e6374201f0c52e792ccb08ce2b1c4bbf0cc2be96f5b  base-account.pamd
8223b815148c3b9b874d2c283840f6428c266e56c7cf49ce8fc508c4945ae31c837bef96dab17f64a60812d1c9cd0055cf0a50d7951d23070b69bd2e5bb9666d  base-password.pamd
6e262f1b1bb4cc01f43c0c3cb72136ebd976d25cb27ca35fd8a76b3dfd57e9938e359d20671f4077ad75b1d38cb944596539220a44d9b6b92cc234605a95ada1  base-session.pamd
444e20046843057b17c0aac14d2b71a68923b989b3d8b478bbf684698673683186e928e5ca2e6cb9a1c76abc4248044a0e10ef6b06b3f51857106796ecce250d  base-session-noninteractive.pamd
d103ba06b2c4929171e09c845f9866539220cd20d8d56a03d25850342ef5eabe281e958dfe1eaefd550c00f9440e8700c1d74c88c3001f933134ca6fd7cb9b7b  other.pamd
83cc3d84ef5afded9afd4d347132901b9adcbd8b21be45b80d010370a2082e8388a713eb78d052944bc47b07fd7383edf18e2674d9d0545215cc45e14a2e14b1  system-local-login.pamd
80b8b8153f7537190a5f6dc965169e5ab4b535a01024e554b14aa99ec5f6428740da54087e4c186978a3df0f9a5b62d37ae5cd35dd69a31c1d5ba71166b1f1a6  system-login.pamd
b512d691f2a6b11fc329bf91dd05ca9c589bbd444308b27d3c87c75262dedf6afc68a9739229249a4bd3d0c43cb1f871eecbb93c4fe559e0f38bdabbffd06ad7  su.pamd"