From 9c8158c9d37a7009a655c645f964375b86f53679 Mon Sep 17 00:00:00 2001 From: dlg Date: Tue, 18 Mar 2008 09:15:50 +0000 Subject: [PATCH] add support for talking to active directory with an ads flavor. ok mbalmer@ jasper@ --- net/samba/Makefile | 23 ++++++++++++++++++++--- net/samba/files/krb5-config | 9 +++++++++ net/samba/pkg/DESCR-main | 1 + 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100755 net/samba/files/krb5-config diff --git a/net/samba/Makefile b/net/samba/Makefile index f553394f8f1..cb3c971757c 100644 --- a/net/samba/Makefile +++ b/net/samba/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.89 2008/01/04 17:48:37 espie Exp $ +# $OpenBSD: Makefile,v 1.90 2008/03/18 09:15:50 dlg Exp $ COMMENT-main= SMB and CIFS client and server for UNIX COMMENT-docs= documentation and examples for samba DISTNAME= samba-3.0.28 -PKGNAME-main= ${DISTNAME} +PKGNAME-main= ${DISTNAME}p0 FULLPKGNAME-docs= ${DISTNAME:S/-/-docs-/} SHARED_LIBS= smbclient 1.0 \ msrpc 1.0 @@ -60,7 +60,7 @@ CONFIGURE_ARGS= --localstatedir="/var" \ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib -Wl,--export-dynamic" -FLAVORS= cups ldap +FLAVORS= cups ldap ads FLAVOR?= MULTI_PACKAGES= -main -docs @@ -73,6 +73,10 @@ WANTLIB+= ssl crypto m pthread z CONFIGURE_ARGS+= --disable-cups .endif +.if ${FLAVOR:L:Mldap} && ${FLAVOR:L:Mads} +ERRORS+="Fatal: ldap and ads flavors conflict" +.endif + .if ${FLAVOR:L:Mldap} CONFIGURE_ARGS+= --with-ldap --without-ads LIB_DEPENDS+= ldap,lber::databases/openldap @@ -81,6 +85,15 @@ BUILD_DEPENDS+= ::misc/libutf8 CONFIGURE_ARGS+= --without-ldap --without-ads .endif +.if ${FLAVOR:L:Mads} +CONFIGURE_ARGS+= --with-ldap --with-krb5="${WRKDIR}/usr" --with-ads +LIB_DEPENDS+= ldap,lber::databases/openldap +BUILD_DEPENDS+= ::misc/libutf8 +WANTLIB+= asn1 com_err gssapi krb5 +.else +CONFIGURE_ARGS+= --without-ldap --without-ads +.endif + PKG_ARCH-docs= * LIB_DEPENDS-docs= WANTLIB-docs= @@ -102,6 +115,10 @@ pre-configure: -e 's,!!LOCALBASE!!,${LOCALBASE},g' \ ${WRKSRC}/../docs/manpages/swat.8 +post-extract: + cp ${FILESDIR}/krb5-config ${WRKDIR}/bin + chmod a+x ${WRKDIR}/bin/krb5-config + post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/samba/pdf ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/samba/htmldocs diff --git a/net/samba/files/krb5-config b/net/samba/files/krb5-config new file mode 100755 index 00000000000..bec5ea6064d --- /dev/null +++ b/net/samba/files/krb5-config @@ -0,0 +1,9 @@ +#! /bin/sh + +case x$1 in +x--libs) + echo '-lgssapi -lkrb5 -lasn1 -lcrypto';; +x--cflags) + echo '-I/usr/include/kerberosV';; +esac +exit 0 diff --git a/net/samba/pkg/DESCR-main b/net/samba/pkg/DESCR-main index 0818bf3be95..907ffb13763 100644 --- a/net/samba/pkg/DESCR-main +++ b/net/samba/pkg/DESCR-main @@ -12,6 +12,7 @@ Available flavors: cups Enable CUPS support ldap Enable LDAP support +ads Enable Active Directory support Available subpackage: