summaryrefslogtreecommitdiffstats
path: root/main/linux-pam/APKBUILD
blob: cbad0c4184b94729abc14e3528a9140c5f49fcf0 (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=linux-pam
pkgver=1.1.8
pkgrel=0
pkgdesc="pluggable authentication modules for linux"
url="http://www.kernel.org/pub/linux/libs/pam"
arch="all"
license="BSD"
depends=
depends_dev="gettext-dev"
makedepends="$depends_dev bison flex autoconf automake libtool"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="https://fedorahosted.org/releases/l/i/linux-pam/Linux-PAM-$pkgver.tar.bz2
	linux-pam-innetgr.patch
	fix-compat.patch
	libpam-fix-build-with-eglibc-2.16.patch

	base-auth.pamd
	base-account.pamd
	base-password.pamd
	base-session.pamd
	base-session-noninteractive.pamd
	other.pamd
	"

_builddir="$srcdir"/Linux-PAM-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	# disable insecure modules
	sed -e 's/pam_rhosts//g' -i modules/Makefile.am
}

build() {
	cd "$_builddir"
	autoreconf -vif || return 1
	[ "$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 \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1

	# do not install pam.d files bundled with the source, they could be broken
	rm -rf "$pkgdir"/etc/pam.d

	# 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.
	find "$pkgdir" -name *.la -print | xargs rm
}

md5sums="35b6091af95981b1b2cd60d813b5e4ee  Linux-PAM-1.1.8.tar.bz2
c309401e103cc86e8b25557ff3eb0b53  linux-pam-innetgr.patch
283a399db933a7598fc63ada5d3eb38c  fix-compat.patch
23320dadf8e36846b6bbd7903f95ece5  libpam-fix-build-with-eglibc-2.16.patch
aa5bb7c9d8e4687aea1ae69b7447254a  base-auth.pamd
fafcf29cb9bab788cb4933106be31883  base-account.pamd
117535e4938f478efced1398b408cf96  base-password.pamd
baec6808544bf6cebc59e07467f8c213  base-session.pamd
afbdd8eb4db5c31dfd8e8da35c698b90  base-session-noninteractive.pamd
b8e839ece64df173f16d28520eb8d66c  other.pamd"
sha256sums="c4b1f23a236d169e2496fea20721578d864ba00f7242d2b41d81050ac87a1e55  Linux-PAM-1.1.8.tar.bz2
fb609212837c67da7da033a0daa01d1c2e34166867530e6924102b655e00ebde  linux-pam-innetgr.patch
4e1f855779a73960f48e570ce507884325a3aef374721e3973e1e22a60b9bec0  fix-compat.patch
01c9216a2a833d10c2b42e1182b161b125d869e8620e60989636feb721d466c5  libpam-fix-build-with-eglibc-2.16.patch
daedb66d2b6c324f62100657383f3da6af196ad516837f36a3142da5318b8874  base-auth.pamd
51dba5c32d8cfa0c1795b2ed72af7aa5871f7943a20f89d2e4ad00b9053bc9c8  base-account.pamd
16c2d6f750f8bb320d64537554c48e3474f13623e7f6e231135d2cd2362745a3  base-password.pamd
5bf97347375ffc626fd3ed2e8d39abde566c2eca3f5e06a737ccffd48aede5de  base-session.pamd
a65802b72a44b0c2083bce7e7d0cd1b04782272a6281a65c5b0075b8f9bccd5f  base-session-noninteractive.pamd
2e4850ba8db3aee3fe97eaf76286ada585d821cd8affc97c845eb58b2bf68bb6  other.pamd"
sha512sums="245785ab4e187ceaab6393967352c8d2a2319c64e1e83285d0251cc02995dc2edab8e3001301b6d9f6774c441b7557d9caf4dfdf94c7cd5d44aa53ae759d9e5d  Linux-PAM-1.1.8.tar.bz2
ca32ecdacfc5b8f1482031203b616932b646a008b02080315ea2589af5962180d4ff4339c27fe9f6a878a89f47fb69429f4ac75d67b0e70ad7765a4db1dc74d9  linux-pam-innetgr.patch
52b97e23084f7b835ce1fa441663f91a50ea797cb38ba2c6662bcdaf0d25ba487118442674ac347fb17353af126dd6b3b696612faa56cac428dd842d14e1c90d  fix-compat.patch
f49edf3876cc6bcb87bbea4e7beaeb0a382d596898c755f5fbaf6c2ed4e0c8f082b2cd16dde8a74af82bb09a1334f463e07a4bb5b8a48f023ff90a67ad2fdd44  libpam-fix-build-with-eglibc-2.16.patch
0672ab21adb969af2a0082e2559f1196d8a4f8b1cff2836f97e5f24edb03b6aed156c61cf335a4df978e423dcd9934ffee8cb5784ed5dde704d7e5ddec4ba9f6  base-auth.pamd
85462201a4044c7e170e617d39b0eceb4790abc6c0504999117548030a16d80a9d2078d1ad97690d7d346e6374201f0c52e792ccb08ce2b1c4bbf0cc2be96f5b  base-account.pamd
8223b815148c3b9b874d2c283840f6428c266e56c7cf49ce8fc508c4945ae31c837bef96dab17f64a60812d1c9cd0055cf0a50d7951d23070b69bd2e5bb9666d  base-password.pamd
b0138f662715974bd865d755c5e7d403faf5b9ad1b7e2b1d1598ad7eb5764a9ff407f1a5e6ce7f16db9fc10f8d643323b494563416fd6a654032529b52213c5b  base-session.pamd
444e20046843057b17c0aac14d2b71a68923b989b3d8b478bbf684698673683186e928e5ca2e6cb9a1c76abc4248044a0e10ef6b06b3f51857106796ecce250d  base-session-noninteractive.pamd
d103ba06b2c4929171e09c845f9866539220cd20d8d56a03d25850342ef5eabe281e958dfe1eaefd550c00f9440e8700c1d74c88c3001f933134ca6fd7cb9b7b  other.pamd"