--- PKGBUILD.orig 2013-04-20 00:05:41.000000000 +0200 +++ PKGBUILD 2013-04-20 21:45:25.530726537 +0200 @@ -23,7 +23,7 @@ sed -i 's|-m 644 $(LIBRARY)|-m 755 $(LIBRARY)|' libraries/{liblber,libldap,libldap_r}/Makefile.in sed -i 's|#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "run" LDAP_DIRSEP "ldapi"|#define LDAPI_SOCK LDAP_DIRSEP "run" LDAP_DIRSEP "openldap" LDAP_DIRSEP "ldapi"|' include/ldap_defaults.h - sed -i 's|%LOCALSTATEDIR%/run|/run/openldap|' servers/slapd/slapd.conf + sed -i 's|%LOCALSTATEDIR%/run|/run/openldap|' servers/slapd/slapd.{conf,ldif} sed -i 's|-$(MKDIR) $(DESTDIR)$(localstatedir)/run|-$(MKDIR) $(DESTDIR)/run/openldap|' servers/slapd/Makefile.in ./configure --prefix=/usr --mandir=/usr/share/man --libexecdir=/usr/lib \ @@ -56,7 +56,7 @@ popd done install -Dm644 doc/man/man5/ldap.conf.5.tmp "${pkgdir}"/usr/share/man/man5/ldap.conf.5 - + # get rid of duplicate default conf files rm "${pkgdir}"/etc/openldap/*.default @@ -69,7 +69,7 @@ package_openldap() { pkgdesc="Lightweight Directory Access Protocol (LDAP) client and server" depends=("libldap>=${pkgver}" 'libltdl') - backup=('etc/openldap/slapd.conf') + backup=('etc/openldap/slapd.conf' 'etc/openldap/slapd.ldif') options=('!libtool' 'emptydirs') install=openldap.install @@ -87,8 +87,8 @@ ln -s ../lib/slapd "${pkgdir}"/usr/sbin/slapd - chown root:439 "${pkgdir}"/etc/openldap/{slapd.conf,DB_CONFIG.example} - chmod 640 "${pkgdir}"/etc/openldap/{slapd.conf,DB_CONFIG.example} + chown root:439 "${pkgdir}"/etc/openldap/{slapd.{conf,ldif},DB_CONFIG.example} + chmod 640 "${pkgdir}"/etc/openldap/{slapd.{conf,ldif},DB_CONFIG.example} install -dm700 -o 439 -g 439 "${pkgdir}"/var/lib/openldap install -dm700 -o 439 -g 439 "${pkgdir}"/etc/openldap/slapd.d