APKBUILD 2.03 KB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1 2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openldap
3
pkgver=2.4.19
4
pkgrel=1
Natanael Copa's avatar
Natanael Copa committed
5 6 7
pkgdesc="LDAP Server"
url="http://www.openldap.org/"
license="custom"
8
depends=
9
makedepends="db-dev openssl-dev groff"
Natanael Copa's avatar
Natanael Copa committed
10
subpackages="$pkgname-dev $pkgname-doc libldap"
11
install="$pkgname.pre-install $pkgname.post-install"
Natanael Copa's avatar
Natanael Copa committed
12 13 14
source="ftp://ftp.$pkgname.org/pub/OpenLDAP/$pkgname-release/$pkgname-$pkgver.tgz
	openldap-2.4-ppolicy.patch
	openldap-2.4.11-libldap_r.patch
15 16 17
	slapd.initd
	slapd.confd
	slurpd.initd
Natanael Copa's avatar
Natanael Copa committed
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
	"

# berkdb crypt ipv6 ssl 
build () {
	cd "$srcdir"/$pkgname-$pkgver

	for i in ../*.patch; do
		msg "Applying $i..."
		patch -p1 < $i || return 1
	done

	./configure --prefix=/usr \
		--libexecdir=/usr/sbin \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var/lib/openldap \
		--enable-slapd \
		--enable-bdb \
		--enable-hdb \
		--enable-crypt \
		--enable-dynamic \
		--enable-dnssrv=mod \
		--enable-ldap=mod \
		--enable-meta=mod \
		--enable-monitor=mod \
		--enable-null=mod \
		--enable-passwd=mod \
		--enable-relay=mod \
		--enable-shell=mod \
		--enable-sock=mod \
		--with-tls=openssl 
	
	make || return 1
	make DESTDIR="$pkgdir" install
52 53 54 55 56 57 58 59 60

	install -d "$pkgdir"/var/run/openldap
	sed -i -e 's:/var/lib/openldap/run:/var/run/openldap:g' \
		"$pkgdir"/etc/openldap/slapd.conf

	chmod g+r "$pkgdir"/etc/openldap/slapd.conf
	install -Dm755 ../slapd.initd "$pkgdir"/etc/init.d/slapd
	install -Dm755 ../slapd.confd "$pkgdir"/etc/conf.d/slapd
	install -Dm755 ../slurpd.initd "$pkgdir"/etc/init.d/slurpd
Natanael Copa's avatar
Natanael Copa committed
61 62 63 64
}

libldap() {
	pkgdesc="OpenLDAP libraries"
65
	depends=
66
	install=
Natanael Copa's avatar
Natanael Copa committed
67 68 69 70 71
	mkdir -p "$subpkgdir"/usr "$subpkgdir"/etc/openldap
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
	mv "$pkgdir"/etc/openldap/ldap.conf "$subpkgdir"/etc/openldap/
}

72
md5sums="4a6dab2711fcf141f19bb680bc335887  openldap-2.4.19.tgz
Natanael Copa's avatar
Natanael Copa committed
73
2524e490ba334a760fa57057c16da7a9  openldap-2.4-ppolicy.patch
74
d19d0502f046078ecd737e29e7552fa8  openldap-2.4.11-libldap_r.patch
75
a729bf553d12b4a9fbda0ff5202a0443  slapd.initd
76
b672311fca605c398240cd37a2ae080a  slapd.confd
77
fa5ce0005ef5f1160b6ff126f97aaa1a  slurpd.initd"