# $Id: PKGBUILD 53126 2009-09-26 07:43:27Z allan $ # Maintainer: Judd Vinet pkgname=openldap pkgver=2.4.18 pkgrel=2 pkgdesc="LDAP Server" arch=('i686' 'x86_64') license=('custom') url="http://www.openldap.org/" backup=(etc/openldap/slapd.conf etc/default/slapd) depends=("libldap>=${pkgver}" 'db>=4.8' 'tcp_wrappers' 'libfetch' 'util-linux-ng') provides=('openldap-clients') replaces=('openldap-clients') source=(ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-${pkgver}.tgz slapd slapd.default) md5sums=('fecd7a64b6d9a0eb79b817d2562956ed' 'a9c9d906b2132ee3cb3d100ef1c068ae' '95f50ebf185b1caf299fa4e3970d8ec2') options=('!emptydirs') build() { cd ${srcdir}/openldap-${pkgver} ./configure --prefix=/usr \ --mandir=/usr/share/man \ --libexecdir=/usr/sbin \ --sysconfdir=/etc \ --localstatedir=/var/lib/openldap \ --enable-crypt \ --enable-dynamic \ --with-threads \ --enable-wrappers \ --enable-spasswd \ --with-cyrus-sasl find . -name 'Makefile' -exec \ sed -e 's|$(LDAP_LIBDIR)/liblber/liblber.la|/usr/lib/liblber-2.4.so.2|g' \ -e 's|$(LDAP_LIBDIR)/libldap/libldap.la|/usr/lib/libldap-2.4.so.2|g' \ -e 's|$(LDAP_LIBDIR)/libldap_r/libldap_r.la|/usr/lib/libldap_r-2.4.so.2|g' \ -i {} \; cd include make || return 1 cd ../libraries for dir in liblutil librewrite liblunicode; do pushd ${dir} make depend || return 1 make || return 1 popd done cd ../servers make depend || return 1 make || return 1 make DESTDIR=${pkgdir} install cd ../clients make depend || return 1 make || return 1 make DESTDIR=${pkgdir} install cd ../doc/man for dir in man{1,5,8}; do pushd ${dir} make || return 1 make DESTDIR=${pkgdir} install popd done rm ${pkgdir}/usr/share/man/man5/ldap.conf.5 cd ../.. install -Dm755 ${srcdir}/slapd ${pkgdir}/etc/rc.d/slapd install -Dm644 ${srcdir}/slapd.default ${pkgdir}/etc/default/slapd install -dm700 ${pkgdir}/var/lib/openldap # get rid of duplicate default conf files rm ${pkgdir}/etc/openldap/*.default # hack to fix screwed up dirs sed -e 's|^pidfile[[:space:]].*$|pidfile /var/run/slapd.pid|g' \ -e 's|^argsfile[[:space:]].*$|argsfile /var/run/slapd.args|g' \ -i ${pkgdir}/etc/openldap/slapd.conf install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE }