diff --git a/net/openldap24-server/Makefile b/net/openldap24-server/Makefile index e83187400f86..08dce726e099 100644 --- a/net/openldap24-server/Makefile +++ b/net/openldap24-server/Makefile @@ -58,8 +58,8 @@ WANT_OPENLDAP_VER?= 24 BROKEN= incompatible OpenLDAP version: ${WANT_OPENLDAP_VER} .endif -PORTREVISION_CLIENT= 1 -PORTREVISION_SERVER= 3 +PORTREVISION_CLIENT= 2 +PORTREVISION_SERVER= 4 OPENLDAP_SHLIB_MAJOR= 2 OPENLDAP_MAJOR= ${DISTVERSION:R} @@ -521,13 +521,7 @@ post-build: .endif .endif -pre-su-install: - @if [ -f ${PKGINSTALL} ]; then \ - ${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \ - fi -.if ${PORT_OPTIONS:MMODULES} || ${PORT_OPTIONS:MDYNAMIC_BACKENDS} || ${PORT_OPTIONS:MSLAPI} - @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/openldap -.endif +pre-install: .if !defined(CLIENT_ONLY) @${MKDIR} ${STAGEDIR}${DATABASEDIR} .endif @@ -544,16 +538,6 @@ post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib$${library}-${OPENLDAP_MAJOR}.so.${OPENLDAP_SHLIB_MAJOR}; \ done .else - @${MKDIR} ${STAGEDIR}${LDAP_RUN_DIR} - @for schema in ${SCHEMATA}; do \ - ${ECHO_CMD} "@unexec if cmp -s %D/etc/openldap/schema/$${schema}.schema " \ - "%D/etc/openldap/schema/$${schema}.schema.default; then" \ - "rm -f %D/etc/openldap/schema/$${schema}.schema; fi"; \ - ${ECHO_CMD} "etc/openldap/schema/$${schema}.schema.default"; \ - ${ECHO_CMD} "@exec [ -f %B/$${schema}.schema ] || ${CP} %B/%f %B/$${schema}.schema"; \ - done >>${TMPPLIST} - @${ECHO_CMD} "@unexec ${RMDIR} %D/etc/openldap/schema 2>/dev/null || true" >>${TMPPLIST} - @${ECHO_CMD} "@unexec ${RMDIR} %D/etc/openldap 2>/dev/null || true" >>${TMPPLIST} .if ${PORT_OPTIONS:MDYNAMIC_BACKENDS} @${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/openldap/*.so.${OPENLDAP_SHLIB_MAJOR} .endif @@ -571,6 +555,6 @@ post-install: ${STAGEDIR}${PREFIX}/libexec/openldap/ @${LN} -s pw-sha2.so.0 ${STAGEDIR}${PREFIX}/libexec/openldap/pw-sha2.so .endif -.endif +.endif # defined(CLIENT_ONLY) .include diff --git a/net/openldap24-server/files/patch-libraries__libldap__Makefile.in b/net/openldap24-server/files/patch-libraries__libldap__Makefile.in new file mode 100644 index 000000000000..98cc7ebe0b7f --- /dev/null +++ b/net/openldap24-server/files/patch-libraries__libldap__Makefile.in @@ -0,0 +1,17 @@ +--- ./libraries/libldap/Makefile.in.orig 2014-08-27 09:41:52.000000000 +0200 ++++ ./libraries/libldap/Makefile.in 2014-08-27 09:43:35.000000000 +0200 +@@ -72,13 +72,6 @@ + $(LTFINISH) $(DESTDIR)$(libdir) + -$(MKDIR) $(DESTDIR)$(sysconfdir) + @for i in $(CFFILES); do \ +- if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \ +- echo "installing $$i in $(sysconfdir)"; \ +- echo "$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i"; \ +- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i; \ +- else \ +- echo "PRESERVING EXISTING CONFIGURATION FILE $(sysconfdir)/$$i" ; \ +- fi; \ +- $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i.default; \ ++ $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i.sample; \ + done + diff --git a/net/openldap24-server/files/patch-servers__slapd__Makefile.in b/net/openldap24-server/files/patch-servers__slapd__Makefile.in index 6444fb575208..5442ef82e951 100644 --- a/net/openldap24-server/files/patch-servers__slapd__Makefile.in +++ b/net/openldap24-server/files/patch-servers__slapd__Makefile.in @@ -1,6 +1,6 @@ ---- servers/slapd/Makefile.in.orig 2008-02-11 15:26:43.000000000 -0800 -+++ servers/slapd/Makefile.in 2008-07-19 20:10:16.023473779 -0700 -@@ -371,7 +371,6 @@ +--- servers/slapd/Makefile.in.orig 2014-01-25 13:36:15 UTC ++++ servers/slapd/Makefile.in +@@ -377,7 +377,6 @@ install-slapd: FORCE -$(MKDIR) $(DESTDIR)$(libexecdir) @@ -8,7 +8,7 @@ $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \ slapd$(EXEEXT) $(DESTDIR)$(libexecdir) @for i in $(SUBDIRS); do \ -@@ -406,16 +405,18 @@ +@@ -412,43 +411,28 @@ touch all-cffiles install-schema: FORCE @@ -28,12 +28,31 @@ + files=`cd $(srcdir)/schema ; echo *.schema` ; \ + for i in $$files ; do \ + echo $(INSTALL) $(INSTALLFLAGS) -m 444 schema/$$i $$SD/$$i ; \ -+ [ -f $$SD/$$i ] || $(INSTALL) $(INSTALLFLAGS) -m 444 $(srcdir)/schema/$$i $$SD/$$i ; \ -+ $(INSTALL) $(INSTALLFLAGS) -m 444 $(srcdir)/schema/$$i $$SD/$$i.default ; \ ++ $(INSTALL) $(INSTALLFLAGS) -m 444 $(srcdir)/schema/$$i $$SD/$$i.sample ; \ done install-conf: FORCE -@@ -441,8 +442,6 @@ + @-$(MKDIR) $(DESTDIR)$(sysconfdir) +- $(INSTALL) $(INSTALLFLAGS) -m 600 slapd.conf.tmp $(DESTDIR)$(sysconfdir)/slapd.conf.default +- if test ! -f $(DESTDIR)$(sysconfdir)/slapd.conf; then \ +- echo "installing slapd.conf in $(sysconfdir)"; \ +- echo "$(INSTALL) $(INSTALLFLAGS) -m 600 slapd.conf.tmp $(DESTDIR)$(sysconfdir)/slapd.conf"; \ +- $(INSTALL) $(INSTALLFLAGS) -m 600 slapd.conf.tmp $(DESTDIR)$(sysconfdir)/slapd.conf; \ +- else \ +- echo "PRESERVING EXISTING CONFIGURATION FILE $(DESTDIR)$(sysconfdir)/slapd.conf" ; \ +- fi +- $(INSTALL) $(INSTALLFLAGS) -m 600 slapd.ldif.tmp $(DESTDIR)$(sysconfdir)/slapd.ldif.default +- if test ! -f $(DESTDIR)$(sysconfdir)/slapd.ldif; then \ +- echo "installing slapd.ldif in $(sysconfdir)"; \ +- echo "$(INSTALL) $(INSTALLFLAGS) -m 600 slapd.ldif.tmp $(DESTDIR)$(sysconfdir)/slapd.ldif"; \ +- $(INSTALL) $(INSTALLFLAGS) -m 600 slapd.ldif.tmp $(DESTDIR)$(sysconfdir)/slapd.ldif; \ +- else \ +- echo "PRESERVING EXISTING CONFIGURATION FILE $(DESTDIR)$(sysconfdir)/slapd.ldif" ; \ +- fi ++ $(INSTALL) $(INSTALLFLAGS) -m 600 slapd.conf.tmp $(DESTDIR)$(sysconfdir)/slapd.conf.sample ++ $(INSTALL) $(INSTALLFLAGS) -m 600 slapd.ldif.tmp $(DESTDIR)$(sysconfdir)/slapd.ldif.sample + + install-db-config: FORCE @-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-data $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \ diff --git a/net/openldap24-server/pkg-plist b/net/openldap24-server/pkg-plist index 84404ad19c79..c8cbfa205cc4 100644 --- a/net/openldap24-server/pkg-plist +++ b/net/openldap24-server/pkg-plist @@ -1,24 +1,34 @@ @unexec %%RC_DIR%%/etc/rc.d/slapd stop 2>&1 >/dev/null || true -etc/openldap/slapd.ldif.default -etc/openldap/slapd.ldif -@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi -etc/openldap/slapd.conf.default -@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf -etc/openldap/schema/ppolicy.ldif -etc/openldap/schema/pmi.ldif -etc/openldap/schema/openldap.ldif -etc/openldap/schema/nis.ldif -etc/openldap/schema/misc.ldif -etc/openldap/schema/java.ldif -etc/openldap/schema/inetorgperson.ldif -etc/openldap/schema/dyngroup.ldif -etc/openldap/schema/duaconf.ldif -etc/openldap/schema/cosine.ldif -etc/openldap/schema/core.ldif -etc/openldap/schema/corba.ldif -etc/openldap/schema/collective.ldif -etc/openldap/schema/README -%%BACK_BDB%%etc/openldap/DB_CONFIG.example +%%ETCDIR%%/schema/README +%%ETCDIR%%/schema/collective.ldif +@sample %%ETCDIR%%/schema/collective.schema.sample +%%ETCDIR%%/schema/corba.ldif +@sample %%ETCDIR%%/schema/corba.schema.sample +%%ETCDIR%%/schema/core.ldif +@sample %%ETCDIR%%/schema/core.schema.sample +%%ETCDIR%%/schema/cosine.ldif +@sample %%ETCDIR%%/schema/cosine.schema.sample +%%ETCDIR%%/schema/duaconf.ldif +@sample %%ETCDIR%%/schema/duaconf.schema.sample +%%ETCDIR%%/schema/dyngroup.ldif +@sample %%ETCDIR%%/schema/dyngroup.schema.sample +%%ETCDIR%%/schema/inetorgperson.ldif +@sample %%ETCDIR%%/schema/inetorgperson.schema.sample +%%ETCDIR%%/schema/java.ldif +@sample %%ETCDIR%%/schema/java.schema.sample +%%ETCDIR%%/schema/misc.ldif +@sample %%ETCDIR%%/schema/misc.schema.sample +%%ETCDIR%%/schema/nis.ldif +@sample %%ETCDIR%%/schema/nis.schema.sample +%%ETCDIR%%/schema/openldap.ldif +@sample %%ETCDIR%%/schema/openldap.schema.sample +%%ETCDIR%%/schema/pmi.ldif +@sample %%ETCDIR%%/schema/pmi.schema.sample +%%ETCDIR%%/schema/ppolicy.ldif +@sample %%ETCDIR%%/schema/ppolicy.schema.sample +@sample %%ETCDIR%%/slapd.conf.sample +@sample %%ETCDIR%%/slapd.ldif.sample +%%BACK_BDB%%%%ETCDIR%%/DB_CONFIG.example %%SLAPI%%lib/libslapi-%%OPENLDAP_MAJOR%%.so.%%SHLIB_MAJOR%% %%SLAPI%%lib/libslapi-%%OPENLDAP_MAJOR%%.so.%%SHLIB_MAJOR%%.10.2 %%SLAPI%%lib/libslapi.a @@ -88,16 +98,6 @@ etc/openldap/schema/README %%SMBPWD%%libexec/openldap/smbk5pwd.so %%SMBPWD%%libexec/openldap/smbk5pwd.so.0 libexec/slapd -%%MODULES%%@dirrmtry libexec/openldap -sbin/slapacl -sbin/slapadd -sbin/slapauth -sbin/slapcat -sbin/slapdn -sbin/slapindex -sbin/slappasswd -sbin/slapschema -sbin/slaptest man/man5/slapd-bdb.5.gz man/man5/slapd-config.5.gz man/man5/slapd-dnssrv.5.gz @@ -152,5 +152,15 @@ man/man8/slapindex.8.gz man/man8/slappasswd.8.gz man/man8/slapschema.8.gz man/man8/slaptest.8.gz +sbin/slapacl +sbin/slapadd +sbin/slapauth +sbin/slapcat +sbin/slapdn +sbin/slapindex +sbin/slappasswd +sbin/slapschema +sbin/slaptest +%%MODULES%%@dirrmtry libexec/openldap @dirrmtry(%%LDAP_USER%%,%%LDAP_GROUP%%,) %%LDAP_RUN_DIR%% @dirrmtry(%%LDAP_USER%%,%%LDAP_GROUP%%,) %%DATABASEDIR%% diff --git a/net/openldap24-server/pkg-plist.client b/net/openldap24-server/pkg-plist.client index 2d6a2db0b784..84fbb09051ad 100644 --- a/net/openldap24-server/pkg-plist.client +++ b/net/openldap24-server/pkg-plist.client @@ -8,10 +8,7 @@ bin/ldappasswd bin/ldapsearch bin/ldapurl bin/ldapwhoami -@unexec if cmp -s %D/etc/openldap/ldap.conf %D/etc/openldap/ldap.conf.default; then rm -f %D/etc/openldap/ldap.conf; fi -etc/openldap/ldap.conf.default -@exec [ -f %B/ldap.conf ] || cp %B/%f %B/ldap.conf -@dirrmtry etc/openldap +@sample %%ETCDIR%%/ldap.conf.sample include/lber.h include/lber_types.h include/ldap.h @@ -230,3 +227,4 @@ man/man3/ldap_value_free.3.gz man/man3/ldap_value_free_len.3.gz man/man5/ldap.conf.5.gz man/man5/ldif.5.gz +@dirrmtry %%ETCDIR%%