summaryrefslogtreecommitdiffstats
path: root/testing/linux-pam/APKBUILD
blob: dc0f76a0e5fdb9ace6dbd290942a58a8bbd56884 (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=linux-pam
pkgver=1.1.3
pkgrel=2
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"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="http://www.kernel.org/pub/linux/libs/pam/library/Linux-PAM-$pkgver.tar.bz2
	linux-pam-innetgr.patch
	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
}

build() {
	cd "$_builddir"
	./configure --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/*
	cp "$srcdir"/other.pamd "$pkgdir"/etc/pam.d
}

md5sums="6db7fcb5db6253350e3a4648ceac40e7  Linux-PAM-1.1.3.tar.bz2
c309401e103cc86e8b25557ff3eb0b53  linux-pam-innetgr.patch
20ed7aa9c65942e4020a891b06ee5b76  other.pamd"