diff --git a/srcpkgs/libldap b/srcpkgs/libldap new file mode 120000 index 00000000000..97c301443a1 --- /dev/null +++ b/srcpkgs/libldap @@ -0,0 +1 @@ +openldap \ No newline at end of file diff --git a/srcpkgs/libldap/template b/srcpkgs/libldap/template deleted file mode 100644 index 00a815d6f76..00000000000 --- a/srcpkgs/libldap/template +++ /dev/null @@ -1,47 +0,0 @@ -# Template file for 'libldap' -pkgname=libldap -version=2.4.42 -revision=1 -wrksrc="openldap-${version}" -build_style=gnu-configure -configure_args="--enable-dynamic --enable-proctitle --with-tls - --enable-ipv6 --enable-local --with-cyrus-sasl --with-threads - --enable-syslog --disable-slapd --disable-static - --with-yielding_select=yes" -hostmakedepends="pkg-config groff automake libtool" -makedepends="libressl-devel libsasl-devel" -conf_files="/etc/openldap/ldap.conf" -short_desc="OpenLDAP (Lightweight Directory Access Protocol) libraries" -license="OpenLDAP License v2.8 - BSD alike" -maintainer="Juan RP " -homepage="http://www.openldap.org" -distfiles="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-$version.tgz" -checksum=eeb7b0e2c5852bfd2650e83909bb6152835c0b862fab10b63954dc1bcbba8e63 - -pre_configure() { - aclocal; autoconf; autoheader; libtoolize -f -} - -post_install() { - # Remove unused stuff. - rm -rf ${DESTDIR}/usr/bin - rm -rf ${DESTDIR}/usr/share/man/man[18] - rm -f ${DESTDIR}/etc/openldap/*.default - mv ${DESTDIR}/usr/share/man/man5/ldap.conf.5 ${DESTDIR}/usr/share/man - rm -f ${DESTDIR}/usr/share/man/man5/* - mv ${DESTDIR}/usr/share/man/ldap.conf.5 ${DESTDIR}/usr/share/man/man5 - # License - vlicense LICENSE - - chmod 755 ${DESTDIR}/usr/lib/*.so.* -} - -libldap-devel_package() { - depends="${makedepends} ${sourcepkg}>=${version}_${revision}" - short_desc+=" - development files" - pkg_install() { - vmove usr/include - vmove "usr/lib/*.so" - vmove usr/share/man/man3 - } -} diff --git a/srcpkgs/openldap/INSTALL b/srcpkgs/openldap/INSTALL new file mode 100644 index 00000000000..6d85e7d9412 --- /dev/null +++ b/srcpkgs/openldap/INSTALL @@ -0,0 +1,10 @@ +# INSTALL + +case "$ACTION" in +post) + if [ "$UPDATE" = "no" ]; then + chown ldap:ldap /etc/openldap/slapd.conf + chown -R ldap:ldap /var/lib/openldap + fi + ;; +esac diff --git a/srcpkgs/openldap/files/slapd/run b/srcpkgs/openldap/files/slapd/run new file mode 100644 index 00000000000..f7addfcbeea --- /dev/null +++ b/srcpkgs/openldap/files/slapd/run @@ -0,0 +1,10 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +: ${LDAPUSER:=ldap} +: ${LDAPGROUP:=ldap} +if [ ! -d /run/openldap ]; then + mkdir /run/openldap + chown $LDAPUSER:$LDAPGROUP /run/openldap +fi +exec 2>&1 +exec slapd -u $LDAPUSER -g $LDAPGROUP -d 0 diff --git a/srcpkgs/libldap/patches/libressl.patch b/srcpkgs/openldap/patches/libressl.patch similarity index 100% rename from srcpkgs/libldap/patches/libressl.patch rename to srcpkgs/openldap/patches/libressl.patch diff --git a/srcpkgs/openldap/template b/srcpkgs/openldap/template new file mode 100644 index 00000000000..edb6591731c --- /dev/null +++ b/srcpkgs/openldap/template @@ -0,0 +1,61 @@ +# Template file for 'libldap' +pkgname=openldap +version=2.4.42 +revision=1 +build_style=gnu-configure +configure_args="--prefix=/usr + --libexecdir=/usr/libexec + --sysconfdir=/etc + --localstatedir=/var/lib/openldap + --sbindir=/usr/bin + --enable-dynamic --enable-proctitle --with-tls + --enable-ipv6 --enable-local --with-cyrus-sasl --with-threads + --enable-syslog --enable-slapd --enable-crypt --enable-spasswd + --enable-bdb --enable-hdb --enable-overlays=mod + --disable-static --with-yielding_select=yes" +hostmakedepends="pkg-config groff automake libtool" +makedepends="libressl-devel libsasl-devel db-devel" +conf_files="/etc/openldap/ldap.conf" +short_desc="OpenLDAP (Lightweight Directory Access Protocol)" +license="OpenLDAP License v2.8 - BSD alike" +maintainer="Juan RP " +homepage="http://www.openldap.org" +distfiles="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-$version.tgz" +checksum=eeb7b0e2c5852bfd2650e83909bb6152835c0b862fab10b63954dc1bcbba8e63 + +system_accounts="ldap" +ldap_homedir="/var/lib/openldap" +make_dirs=" + /var/lib/openldap 0755 ldap ldap" + +pre_configure() { + 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,ldif} + sed -i 's|-$(MKDIR) $(DESTDIR)$(localstatedir)/run|-$(MKDIR) $(DESTDIR)/run/openldap|' servers/slapd/Makefile.in + aclocal; autoconf; autoheader; libtoolize -f +} + +post_install() { + ln -sf ../libexec/slapd "${DESTDIR}"/usr/bin/slapd + vsv slapd + vlicense LICENSE + chmod 755 ${DESTDIR}/usr/lib/*.so.* +} + + +libldap-devel_package() { + depends="${makedepends} ${sourcepkg}>=${version}_${revision}" + short_desc+=" library - development files" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.so" + vmove usr/share/man/man3 + } +} + +libldap_package() { + short_desc+=" library" + pkg_install() { + vmove "usr/lib/*.so.*" + } +} diff --git a/srcpkgs/libldap/update b/srcpkgs/openldap/update similarity index 100% rename from srcpkgs/libldap/update rename to srcpkgs/openldap/update