add support for talking to active directory with an ads flavor.

ok mbalmer@ jasper@
This commit is contained in:
dlg 2008-03-18 09:15:50 +00:00
parent f35d6e0b19
commit 9c8158c9d3
3 changed files with 30 additions and 3 deletions

View File

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

9
net/samba/files/krb5-config Executable file
View File

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

View File

@ -12,6 +12,7 @@ Available flavors:
cups Enable CUPS support
ldap Enable LDAP support
ads Enable Active Directory support
Available subpackage: