From 53b87d03f1c7cb52d7dc067cc7d6bd53f94a7480 Mon Sep 17 00:00:00 2001 From: adam Date: Fri, 17 Dec 2010 10:20:51 +0000 Subject: Fix building openldap-smbk5pwd on machines other than NetBSD, and without kerberos if Heimdal not found (only Samba support). --- databases/openldap-smbk5pwd/MESSAGE | 4 ++-- databases/openldap-smbk5pwd/Makefile | 24 ++++++++++++++++++++---- databases/openldap-smbk5pwd/PLIST | 3 +-- databases/openldap/Makefile.common | 7 ++++++- databases/openldap/distinfo | 4 ++-- databases/openldap/patches/patch-da | 31 +++++++++++++++++++------------ 6 files changed, 50 insertions(+), 23 deletions(-) (limited to 'databases') diff --git a/databases/openldap-smbk5pwd/MESSAGE b/databases/openldap-smbk5pwd/MESSAGE index bddab83ef38..f61ab6bda6b 100644 --- a/databases/openldap-smbk5pwd/MESSAGE +++ b/databases/openldap-smbk5pwd/MESSAGE @@ -1,8 +1,8 @@ =========================================================================== -$NetBSD: MESSAGE,v 1.1.1.1 2009/01/31 16:00:55 manu Exp $ +$NetBSD: MESSAGE,v 1.2 2010/12/17 10:20:51 adam Exp $ Please note that this module require slapd to be built with dynamic -module support. THis can be obtained by adding the following to mk.conf: +module support. This can be obtained by adding the following to mk.conf: PKG_OPTIONS.openldap-server= dso In order to enable the use of this module, add this directive to slapd.conf: diff --git a/databases/openldap-smbk5pwd/Makefile b/databases/openldap-smbk5pwd/Makefile index 7fcaeedf2cb..9383529ae3c 100644 --- a/databases/openldap-smbk5pwd/Makefile +++ b/databases/openldap-smbk5pwd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2010/07/24 11:15:17 ghen Exp $ +# $NetBSD: Makefile,v 1.9 2010/12/17 10:20:51 adam Exp $ PKGNAME= ${DISTNAME:S/-/-smbk5pwd-/} COMMENT= Samba and Kerberos password sync for OpenLDAP @@ -11,15 +11,31 @@ PKG_DESTDIR_SUPPORT= user-destdir USE_LIBTOOL= yes BUILD_DIRS= include contrib/slapd-modules/smbk5pwd +INSTALLATION_DIRS+= lib/openldap do-install: - ${INSTALL_LIB_DIR} ${DESTDIR}${PREFIX}/lib/openldap - ${LIBTOOL} --mode=install ${INSTALL_DATA} \ + ${LIBTOOL} --mode=install ${INSTALL_LIB} \ ${WRKSRC}/contrib/slapd-modules/smbk5pwd/smbk5pwd.la \ ${DESTDIR}${PREFIX}/lib/openldap +.include "../../mk/bsd.prefs.mk" + +.if ${OPSYS} == "NetBSD" +LIBS+= -ldes +.endif + +.include "../../mk/krb5.buildlink3.mk" + +.if ${KRB5_TYPE} == "heimdal" +CPPFLAGS+= -DDO_SAMBA -DDO_KRB5 +LIBS+= -lkrb5 -lkadm5srv +.else +CPPFLAGS+= -DDO_SAMBA +.endif + +MAKE_ENV+= LIBS=${LIBS:M*:Q} + .include "../../databases/openldap/Makefile.common" .include "../../databases/openldap-client/buildlink3.mk" .include "../../databases/openldap-server/options.mk" -.include "../../mk/krb5.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/databases/openldap-smbk5pwd/PLIST b/databases/openldap-smbk5pwd/PLIST index 50ace53aa01..9da1885fc15 100644 --- a/databases/openldap-smbk5pwd/PLIST +++ b/databases/openldap-smbk5pwd/PLIST @@ -1,3 +1,2 @@ -@comment $NetBSD: PLIST,v 1.2 2009/06/14 17:43:20 joerg Exp $ -lib/openldap/smbk5pwd.a +@comment $NetBSD: PLIST,v 1.3 2010/12/17 10:20:51 adam Exp $ lib/openldap/smbk5pwd.la diff --git a/databases/openldap/Makefile.common b/databases/openldap/Makefile.common index 1e9faad978e..e216a4b0409 100644 --- a/databases/openldap/Makefile.common +++ b/databases/openldap/Makefile.common @@ -1,4 +1,9 @@ -# $NetBSD: Makefile.common,v 1.26 2010/07/24 11:15:16 ghen Exp $ +# $NetBSD: Makefile.common,v 1.27 2010/12/17 10:20:51 adam Exp $ +# +# used by databases/openldap-client/Makefile +# used by databases/openldap-nops/Makefile +# used by databases/openldap-server/Makefile +# used by databases/openldap-smbk5pwd/Makefile # please stick to the "stable" releases as much as possible! DISTNAME= openldap-2.4.23 diff --git a/databases/openldap/distinfo b/databases/openldap/distinfo index f6715ad2c64..0e3138154b4 100644 --- a/databases/openldap/distinfo +++ b/databases/openldap/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.78 2010/07/24 11:15:16 ghen Exp $ +$NetBSD: distinfo,v 1.79 2010/12/17 10:20:51 adam Exp $ SHA1 (openldap-2.4.23.tgz) = 26027e7020256c5f47e17787f17ee8b31af42378 RMD160 (openldap-2.4.23.tgz) = d2268e8fb894680d1d9926fedca736f195e0a0be @@ -13,6 +13,6 @@ SHA1 (patch-aj) = 4cedc384f2e81d592d66c0e1688e61cf0e69b05d SHA1 (patch-am) = cf97dbc86ed1e0dc3cd7f901dd3f0e4c77490a82 SHA1 (patch-an) = f98c6457474247c092dd0a062e86560cc894ec4e SHA1 (patch-ao) = 6276a1226689fc3be3ffacbcd8df2e4f3e51d1a0 -SHA1 (patch-da) = b1b3759c0450fe9324c5d222969fd57788506e4a +SHA1 (patch-da) = cb705b12715869ef4df4477ac82ab006154978de SHA1 (patch-dd) = bc1b506e0516f8ee604898beb39380111d07c56f SHA1 (patch-de) = 749cdbf2d76bcf4ff192ef087f1404b608447a30 diff --git a/databases/openldap/patches/patch-da b/databases/openldap/patches/patch-da index 123b6285d9c..db384c1e9e2 100644 --- a/databases/openldap/patches/patch-da +++ b/databases/openldap/patches/patch-da @@ -1,24 +1,31 @@ -$NetBSD: patch-da,v 1.3 2009/10/29 13:51:19 ghen Exp $ +$NetBSD: patch-da,v 1.4 2010/12/17 10:20:51 adam Exp $ ---- contrib/slapd-modules/smbk5pwd/Makefile.orig 2009-10-02 23:16:53.000000000 +0200 +--- contrib/slapd-modules/smbk5pwd/Makefile.orig 2010-04-13 20:22:30.000000000 +0000 +++ contrib/slapd-modules/smbk5pwd/Makefile -@@ -13,8 +13,8 @@ +@@ -13,21 +13,21 @@ # . LIBTOOL=../../../libtool -OPT=-g -O2 -CC=gcc -+OPT=-g -O2 ${CPPFLAGS} ++OPT=${CFLAGS} ${CPPFLAGS} +#CC=gcc # Omit DO_KRB5 or DO_SAMBA if you don't want to support it. - DEFS=-DDO_KRB5 -DDO_SAMBA -@@ -45,7 +45,7 @@ smbk5pwd.lo: smbk5pwd.c +-DEFS=-DDO_KRB5 -DDO_SAMBA ++#DEFS=-DDO_KRB5 -DDO_SAMBA - smbk5pwd.la: smbk5pwd.lo - $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \ -- -rpath $(moduledir) -module -o $@ $? $(LIBS) -+ -rpath $(moduledir) -module -o $@ $? -ldes $(LIBS) + HEIMDAL_INC=-I/usr/heimdal/include + SSL_INC= + LDAP_INC=-I../../../include -I../../../servers/slapd +-INCS=$(LDAP_INC) $(HEIMDAL_INC) $(SSL_INC) ++INCS=$(LDAP_INC) $(SSL_INC) - clean: - rm -f smbk5pwd.lo smbk5pwd.la + 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) + + prefix=/usr/local + exec_prefix=$(prefix) -- cgit v1.2.3