From d68f711af03e7bb7c3e87998f042f205b3f31941 Mon Sep 17 00:00:00 2001 From: Sergey Skvortsov Date: Thu, 4 Sep 2008 17:36:25 +0000 Subject: [PATCH] Add option for smbk5pwd overlay. PR: ports/126367 Submitted by: Alexander Kriventsov Approved by: maintainer timeout --- net/openldap24-server/Makefile | 20 ++++++++++++++- .../files/patch-smbk5pwd-Makefile | 25 +++++++++++++++++++ net/openldap24-server/pkg-plist | 3 +++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 net/openldap24-server/files/patch-smbk5pwd-Makefile diff --git a/net/openldap24-server/Makefile b/net/openldap24-server/Makefile index cb2959009a9a..60ead9c78ecf 100644 --- a/net/openldap24-server/Makefile +++ b/net/openldap24-server/Makefile @@ -39,7 +39,7 @@ BROKEN= incompatible OpenLDAP version: ${WANT_OPENLDAP_VER} .endif PORTREVISION_CLIENT= 0 -PORTREVISION_SERVER= 0 +PORTREVISION_SERVER= 1 .if !defined(CLIENT_ONLY) OPTIONS= SASL "With (Cyrus) SASL2 support" off \ @@ -74,6 +74,7 @@ OPTIONS= SASL "With (Cyrus) SASL2 support" off \ TRANSLUCENT "With Translucent Proxy overlay" off \ UNIQUE "With attribute Uniqueness overlay" off \ VALSORT "With Value Sorting overlay" off \ + SMBPWD "With Samba Password hashes overlay" off \ DYNAMIC_BACKENDS "Build dynamic backends" on .endif @@ -388,6 +389,12 @@ BROKEN= choose either iODBC or unixODBC for WITH_ODBC_TYPE PLIST_SUB+= BACK_SQL="@comment " .endif +.if defined(WITH_SMBPWD) +PLIST_SUB+= SMBPWD="" +.else +PLIST_SUB+= SMBPWD="@comment " +.endif + .if defined(WITH_RLOOKUPS) CONFIGURE_ARGS+= --enable-rlookups PLIST_SUB+= RLOOKUPS="" @@ -460,6 +467,12 @@ test: build ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test .endif +.if defined(WITH_SMBPWD) +post-build: + @cd ${BUILD_WRKSRC}/contrib/slapd-modules/smbk5pwd; ${SETENV} ${MAKE_ENV} \ + ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} DEFS="-DDO_SAMBA" all +.endif + pre-su-install: @if [ -f ${PKGINSTALL} ]; then \ ${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \ @@ -489,6 +502,11 @@ post-install: 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 defined(WITH_SMBPWD) + @${INSTALL_PROGRAM} ${WRKSRC}/contrib/slapd-modules/smbk5pwd/smbk5pwd.la \ + ${WRKSRC}/contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so.0 ${PREFIX}/libexec/openldap/ + @${LN} -s smbk5pwd.so.0 ${PREFIX}/libexec/openldap/smbk5pwd.so +.endif .endif @${CAT} ${PKGMESSAGE} diff --git a/net/openldap24-server/files/patch-smbk5pwd-Makefile b/net/openldap24-server/files/patch-smbk5pwd-Makefile new file mode 100644 index 000000000000..6ad2430d46dc --- /dev/null +++ b/net/openldap24-server/files/patch-smbk5pwd-Makefile @@ -0,0 +1,25 @@ +--- contrib/slapd-modules/smbk5pwd/Makefile.orig 2008-09-04 20:37:17.000000000 +0400 ++++ contrib/slapd-modules/smbk5pwd/Makefile 2008-09-04 21:06:32.000000000 +0400 +@@ -9,7 +9,6 @@ + # top-level directory of the distribution or, alternatively, at + # . + +-LIBTOOL=../../../libtool + OPT=-g -O2 + CC=gcc + +@@ -24,7 +23,7 @@ + HEIMDAL_LIB=-L/usr/heimdal/lib -lkrb5 -lkadm5srv + SSL_LIB=-lcrypto + LDAP_LIB=-lldap_r -llber +-LIBS=$(LDAP_LIB) $(HEIMDAL_LIB) $(SSL_LIB) ++LIBS=$(LDAP_LIB) $(SSL_LIB) $(LDFLAGS) + + all: smbk5pwd.la + +@@ -34,4 +33,4 @@ + + smbk5pwd.la: smbk5pwd.lo + $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \ +- -rpath /usr/local/libexec/openldap -module -o $@ $? $(LIBS) ++ -rpath $(PREFIX)/libexec/openldap -module -o $@ $? $(LIBS) diff --git a/net/openldap24-server/pkg-plist b/net/openldap24-server/pkg-plist index 8683aab0ea52..a0625c6ed45e 100644 --- a/net/openldap24-server/pkg-plist +++ b/net/openldap24-server/pkg-plist @@ -68,6 +68,9 @@ etc/openldap/DB_CONFIG.example %%BACK_SQL%%libexec/openldap/back_sql-2.4.so.3 %%BACK_SQL%%libexec/openldap/back_sql.la %%BACK_SQL%%libexec/openldap/back_sql.so +%%SMBPWD%%libexec/openldap/smbk5pwd.la +%%SMBPWD%%libexec/openldap/smbk5pwd.so +%%SMBPWD%%libexec/openldap/smbk5pwd.so.0 libexec/slapd @dirrmtry libexec/openldap sbin/slapacl