1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00

cleanup openldap24-server / client

- pre-su-instal no longer required with staging (replaced with pre-install)
- pkg-install was removed in r295334, so remove the part in Makefile
- handle schema.sample files during install and use the @sample keyword
- use %%ETCDIR%% in pkg-plist
- bump PORTREVISION

PR:		193439
Submitted by:	ohauer
Approved by:	delphij
This commit is contained in:
Olli Hauer 2014-09-10 21:17:25 +00:00
parent a853833cf3
commit 911506b408
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=367895
5 changed files with 89 additions and 61 deletions

View File

@ -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 <bsd.port.post.mk>

View File

@ -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

View File

@ -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 \

View File

@ -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%%

View File

@ -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%%