From a816d230e1457f50eb5752c4bf34b422f30b258c Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 24 Feb 2010 13:39:50 +0000 Subject: main/openldap: use dynamic backend modules create subpackage for the biggest backends --- main/openldap/APKBUILD | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'main/openldap/APKBUILD') diff --git a/main/openldap/APKBUILD b/main/openldap/APKBUILD index 5b440336c8..b0cdbbbab5 100644 --- a/main/openldap/APKBUILD +++ b/main/openldap/APKBUILD @@ -1,13 +1,16 @@ # Maintainer: Natanael Copa pkgname=openldap pkgver=2.4.19 -pkgrel=3 +pkgrel=4 pkgdesc="LDAP Server" url="http://www.openldap.org/" license="custom" depends= -makedepends="db-dev openssl-dev groff unixodbc-dev" -subpackages="$pkgname-dev $pkgname-doc libldap" +makedepends="db-dev openssl-dev groff unixodbc-dev libtool" +subpackages="$pkgname-dev $pkgname-doc libldap $pkgname-back-sql:sql + $pkgname-back-bdb:bdb $pkgname-back-hdb:hdb $pkgname-back-ldap:ldap + $pkgname-back-meta:meta $pkgname-back-monitor:monitor" + install="$pkgname.pre-install $pkgname.post-install" source="ftp://ftp.$pkgname.org/pub/OpenLDAP/$pkgname-release/$pkgname-$pkgver.tgz openldap-2.4-ppolicy.patch @@ -27,16 +30,16 @@ build () { done ./configure --prefix=/usr \ - --libexecdir=/usr/sbin \ + --libexecdir=/usr/lib \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var/lib/openldap \ --enable-slapd \ - --enable-bdb \ - --enable-hdb \ - --enable-sql \ --enable-crypt \ + --enable-modules \ --enable-dynamic \ + --enable-bdb=mod \ + --enable-hdb=mod \ --enable-dnssrv=mod \ --enable-ldap=mod \ --enable-meta=mod \ @@ -46,6 +49,7 @@ build () { --enable-relay=mod \ --enable-shell=mod \ --enable-sock=mod \ + --enable-sql=mod \ --with-tls=openssl make || return 1 @@ -59,6 +63,7 @@ package() { sed -i -e 's:/var/lib/openldap/run:/var/run/openldap:g' \ "$pkgdir"/etc/openldap/slapd.conf + mv "$pkgdir"/usr/lib/slapd "$pkgdir"/usr/sbin/ 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 @@ -69,11 +74,25 @@ libldap() { pkgdesc="OpenLDAP libraries" depends= install= - mkdir -p "$subpkgdir"/usr "$subpkgdir"/etc/openldap - mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ + mkdir -p "$subpkgdir"/usr/lib "$subpkgdir"/etc/openldap + mv "$pkgdir"/usr/lib/*.so* "$subpkgdir"/usr/lib/ mv "$pkgdir"/etc/openldap/ldap.conf "$subpkgdir"/etc/openldap/ } +_backend() { + pkgdesc="OpenLDAP ${2:-$1} backend" + mkdir -p "$subpkgdir"/usr/lib/openldap + mv "$pkgdir"/usr/lib/openldap/back_$1* "$subpkgdir"/usr/lib/openldap/ +} + +bdb() { _backend bdb ; } +hdb() { _backend hdb ; } +sql() { _backend sql ODBC; } +ldap() { _backend ldap LDAP; } +meta() { _backend meta; } +monitor() { _backend monitor; } + + md5sums="4a6dab2711fcf141f19bb680bc335887 openldap-2.4.19.tgz 2524e490ba334a760fa57057c16da7a9 openldap-2.4-ppolicy.patch d19d0502f046078ecd737e29e7552fa8 openldap-2.4.11-libldap_r.patch -- cgit v1.2.3