1 # $Id: PKGBUILD 109957 2011-02-14 13:18:22Z andrea $
3 # Contributor: Judd Vinet <jvinet@zeroflux.org>
4 # Contributor: Ian Armstrong <ian@openmail.cc>
9 pkgdesc="LDAP Server with SQL support"
10 arch=('i686' 'x86_64')
12 url="http://www.openldap.org/"
13 backup=('etc/openldap/slapd.conf' 'etc/default/slapd' 'etc/conf.d/slapd')
14 depends=("libldap>=${pkgver}" 'db' 'tcp_wrappers' 'libfetch' 'util-linux-ng' 'unixodbc')
15 provides=('openldap-clients')
16 replaces=('openldap-clients')
17 source=("ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-${pkgver}.tgz"
20 md5sums=('116fe1e23a7b67686d5e62274367e6c0'
21 '832354417c495f29affd2c772808959d'
22 '6be69f6b7e522cb64cce8703da81ed32')
25 cd ${srcdir}/openldap-${pkgver}
28 ./configure --prefix=/usr \
29 --mandir=/usr/share/man \
30 --libexecdir=/usr/sbin \
32 --includedir=/usr/include \
33 --localstatedir=/var/lib/openldap \
43 find . -name 'Makefile' -exec \
44 sed -e 's|$(LDAP_LIBDIR)/liblber/liblber.la|/usr/lib/liblber-2.4.so.2|g' \
45 -e 's|$(LDAP_LIBDIR)/libldap/libldap.la|/usr/lib/libldap-2.4.so.2|g' \
46 -e 's|$(LDAP_LIBDIR)/libldap_r/libldap_r.la|/usr/lib/libldap_r-2.4.so.2|g' \
53 for dir in liblutil librewrite liblunicode; do
69 for dir in man{1,5,8}; do
77 cd ${srcdir}/openldap-${pkgver}
80 make DESTDIR=${pkgdir} install
83 make DESTDIR=${pkgdir} install
86 for dir in man{1,5,8}; do
88 make DESTDIR=${pkgdir} install
91 rm ${pkgdir}/usr/share/man/man5/ldap.conf.5
95 install -dm700 ${pkgdir}/etc/openldap/slapd.d
96 install -Dm755 ${srcdir}/slapd ${pkgdir}/etc/rc.d/slapd
97 install -Dm644 ${srcdir}/slapd.default ${pkgdir}/etc/conf.d/slapd
98 install -dm700 ${pkgdir}/var/lib/openldap
100 # get rid of duplicate default conf files
101 rm ${pkgdir}/etc/openldap/*.default
103 # hack to fix screwed up dirs
104 sed -e 's|^pidfile[[:space:]].*$|pidfile /var/run/slapd.pid|g' \
105 -e 's|^argsfile[[:space:]].*$|argsfile /var/run/slapd.args|g' \
106 -i ${pkgdir}/etc/openldap/slapd.conf
108 install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/openldap/LICENSE