# Maintainer: Natanael Copa pkgname=openldap pkgver=2.4.23 pkgrel=1 pkgdesc="LDAP Server" url="http://www.openldap.org/" arch="all" license="custom" depends= makedepends="db-dev openssl-dev groff unixodbc-dev libtool" depends_dev="openssl-dev" 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 openldap-2.4.11-libldap_r.patch slapd.initd slapd.confd slurpd.initd " # 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/lib \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var/lib/openldap \ --enable-slapd \ --enable-crypt \ --enable-modules \ --enable-dynamic \ --enable-bdb=mod \ --enable-hdb=mod \ --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 \ --enable-sql=mod \ --with-tls=openssl make || return 1 } package() { cd "$srcdir"/$pkgname-$pkgver make DESTDIR="$pkgdir" install install -d "$pkgdir"/var/run/openldap 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 install -Dm755 ../slurpd.initd "$pkgdir"/etc/init.d/slurpd } libldap() { pkgdesc="OpenLDAP libraries" depends= install= 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="90150b8c0d0192e10b30157e68844ddf openldap-2.4.23.tgz 2524e490ba334a760fa57057c16da7a9 openldap-2.4-ppolicy.patch d19d0502f046078ecd737e29e7552fa8 openldap-2.4.11-libldap_r.patch a729bf553d12b4a9fbda0ff5202a0443 slapd.initd b672311fca605c398240cd37a2ae080a slapd.confd fa5ce0005ef5f1160b6ff126f97aaa1a slurpd.initd"