2011-12-17 17:01:12 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.153 2011/12/17 22:01:13 sthen Exp $
|
2010-04-28 04:02:38 -04:00
|
|
|
|
|
|
|
SHARED_ONLY= Yes
|
2001-04-10 07:33:46 -04:00
|
|
|
|
2010-04-26 13:31:57 -04:00
|
|
|
COMMENT-main= SMB and CIFS client and server for UNIX
|
|
|
|
COMMENT-docs= additional documentation and examples for Samba
|
1999-03-19 04:06:04 -05:00
|
|
|
|
2011-10-21 16:10:51 -04:00
|
|
|
DISTNAME= samba-3.6.1
|
2011-12-17 17:01:12 -05:00
|
|
|
REVISION-main= 0
|
2010-07-12 18:07:37 -04:00
|
|
|
PKGNAME-main= ${DISTNAME}
|
2010-04-26 13:31:57 -04:00
|
|
|
FULLPKGNAME-docs= ${DISTNAME:S/-/-docs-/}
|
2010-02-26 13:13:25 -05:00
|
|
|
FULLPKGPATH-docs= net/samba,-docs
|
2011-07-07 22:14:58 -04:00
|
|
|
|
2011-09-26 05:32:12 -04:00
|
|
|
SHARED_LIBS= smbclient 3.0 \
|
|
|
|
smbsharemodes 1.0 \
|
|
|
|
netapi 1.0 \
|
|
|
|
wbclient 1.0
|
2005-04-03 07:20:37 -04:00
|
|
|
|
2010-04-26 13:31:57 -04:00
|
|
|
CATEGORIES= net
|
2005-04-03 07:20:37 -04:00
|
|
|
|
2010-04-26 13:31:57 -04:00
|
|
|
HOMEPAGE= http://www.samba.org/
|
2005-04-03 07:20:37 -04:00
|
|
|
|
2010-06-25 13:39:12 -04:00
|
|
|
MAINTAINER= Ian McWilliam <kaosagnt@tpg.com.au>
|
|
|
|
|
2010-04-26 13:31:57 -04:00
|
|
|
# GPLv3+
|
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
2005-04-03 07:20:37 -04:00
|
|
|
|
2011-09-26 05:32:12 -04:00
|
|
|
WANTLIB= c execinfo ncurses popt pthread readline talloc tdb>=3.0 z
|
2005-04-03 07:20:37 -04:00
|
|
|
|
2007-02-06 02:01:13 -05:00
|
|
|
MASTER_SITES= http://download.samba.org/samba/ftp/ \
|
|
|
|
http://us2.samba.org/samba/ftp/ \
|
2005-05-03 00:33:24 -04:00
|
|
|
http://us2.samba.org/samba/ftp/old-versions/
|
2005-04-03 07:20:37 -04:00
|
|
|
|
2010-04-26 13:31:57 -04:00
|
|
|
MODULES= converters/libiconv
|
|
|
|
|
2011-03-21 05:40:04 -04:00
|
|
|
BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS}
|
2011-09-26 05:32:12 -04:00
|
|
|
LIB_DEPENDS= databases/tdb>=1.2.7 \
|
2010-11-19 17:31:32 -05:00
|
|
|
devel/popt \
|
|
|
|
devel/libexecinfo \
|
|
|
|
devel/libtalloc
|
2010-04-26 13:31:57 -04:00
|
|
|
|
2011-10-21 16:10:51 -04:00
|
|
|
MAKE_FLAGS+= PASSWD_PROGRAM="/usr/bin/passwd" \
|
|
|
|
LIBSMBCLIENT_SHARED_TARGET_SONAME="bin/libsmbclient.so.${LIBsmbclient_VERSION}" \
|
|
|
|
LIBSMBSHAREMODES_SHARED_TARGET_SONAME="bin/libsmbsharemodes.so.${LIBsmbsharemodes_VERSION}" \
|
|
|
|
LIBNETAPI_SHARED_TARGET_SONAME="bin/libnetapi.so.${LIBnetapi_VERSION}" \
|
|
|
|
LIBADDNS_SHARED_TARGET_SONAME="bin/libaddns.so.${LIBaddns_VERSION}" \
|
|
|
|
LIBWBCLIENT_SHARED_TARGET_SONAME="bin/libwbclient.so.${LIBwbclient_VERSION}"
|
2010-04-26 13:31:57 -04:00
|
|
|
|
|
|
|
CONFDIR= ${SYSCONFDIR}/samba
|
|
|
|
SAMBA_LOGDIR= /var/log/samba
|
|
|
|
SUBST_VARS= CONFDIR
|
|
|
|
|
2010-10-18 15:07:19 -04:00
|
|
|
USE_GMAKE= Yes
|
|
|
|
USE_GROFF= Yes
|
2011-09-26 05:32:12 -04:00
|
|
|
#SEPARATE_BUILD= simple
|
2010-04-26 13:31:57 -04:00
|
|
|
CONFIGURE_STYLE= gnu
|
|
|
|
AUTOCONF_VERSION= 2.63
|
|
|
|
|
|
|
|
CONFIGURE_ARGS= --disable-fam \
|
|
|
|
--localstatedir="/var" \
|
|
|
|
--libdir="${PREFIX}/lib/samba" \
|
|
|
|
--sbindir="${PREFIX}/libexec" \
|
|
|
|
--with-configdir="${CONFDIR}" \
|
|
|
|
--with-modulesdir="${PREFIX}/lib/samba" \
|
|
|
|
--with-lockdir="/var/spool/samba" \
|
|
|
|
--with-piddir="/var/run" \
|
|
|
|
--with-logfilebase="${SAMBA_LOGDIR}" \
|
|
|
|
--with-privatedir="${CONFDIR}" \
|
|
|
|
--with-libsmbclient \
|
|
|
|
--with-swatdir="${PREFIX}/share/swat" \
|
|
|
|
--with-syslog \
|
|
|
|
--with-utmp \
|
|
|
|
--with-winbind \
|
|
|
|
--with-wbclient \
|
|
|
|
--enable-avahi=no \
|
|
|
|
--enable-external-libtdb=yes \
|
2011-09-26 05:32:12 -04:00
|
|
|
--enable-external-libtalloc=yes \
|
|
|
|
--enable-pthreadpool
|
2010-04-26 13:31:57 -04:00
|
|
|
|
|
|
|
# Uncomment to enable debugging symbols.
|
|
|
|
#CONFIGURE_ARGS+= --enable-debug
|
|
|
|
|
2010-07-14 03:20:18 -04:00
|
|
|
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
|
|
|
LDFLAGS="-L${LOCALBASE}/lib"
|
2010-04-26 13:31:57 -04:00
|
|
|
|
2011-09-26 05:32:12 -04:00
|
|
|
FLAVORS= cups ldap ads
|
2005-04-03 07:20:37 -04:00
|
|
|
FLAVOR?=
|
|
|
|
|
2010-04-26 13:31:57 -04:00
|
|
|
MULTI_PACKAGES= -main -docs
|
2005-04-03 07:20:37 -04:00
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mcups}
|
2010-11-19 17:31:32 -05:00
|
|
|
LIB_DEPENDS+= print/cups
|
2011-09-26 05:32:12 -04:00
|
|
|
WANTLIB+= asn1 crypto gssapi krb5 m ssl z cups
|
2005-04-03 07:20:37 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-cups
|
|
|
|
.endif
|
|
|
|
|
2008-03-18 05:15:50 -04:00
|
|
|
.if ${FLAVOR:L:Mldap} && ${FLAVOR:L:Mads}
|
2010-04-26 13:31:57 -04:00
|
|
|
ERRORS+= "Fatal: ldap and ads flavors conflict"
|
2008-03-18 05:15:50 -04:00
|
|
|
.endif
|
|
|
|
|
2008-09-17 06:38:59 -04:00
|
|
|
.if ${FLAVOR:L:Mldap} || ${FLAVOR:L:Mads}
|
2010-11-19 17:31:32 -05:00
|
|
|
LIB_DEPENDS+= databases/openldap
|
2010-11-11 12:20:27 -05:00
|
|
|
WANTLIB += ldap lber
|
2005-04-03 07:20:37 -04:00
|
|
|
.else
|
2011-09-26 05:32:12 -04:00
|
|
|
CONFIGURE_ARGS+= --without-ldap
|
2005-04-03 07:20:37 -04:00
|
|
|
.endif
|
|
|
|
|
2008-03-18 05:15:50 -04:00
|
|
|
.if ${FLAVOR:L:Mads}
|
2011-09-26 05:32:12 -04:00
|
|
|
CONFIGURE_ARGS+= --with-krb5="${WRKDIR}/usr"
|
2008-09-17 06:38:59 -04:00
|
|
|
|
2010-04-26 13:31:57 -04:00
|
|
|
# Merged build cruft needs loads of work. Disable until ready.
|
|
|
|
#SEPERATE_BUILD= simple
|
|
|
|
#CONFIGURE_ARGS+= --enable-merged-build
|
|
|
|
#MODULES+= lang/python
|
|
|
|
#MODPY_RUNDEP= No
|
|
|
|
|
|
|
|
WANTLIB+= asn1 com_err crypto gssapi krb5
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-ads
|
2008-03-18 05:15:50 -04:00
|
|
|
.endif
|
|
|
|
|
2010-04-26 13:31:57 -04:00
|
|
|
PKG_ARCH-docs= *
|
2006-11-25 08:00:41 -05:00
|
|
|
LIB_DEPENDS-docs=
|
|
|
|
WANTLIB-docs=
|
|
|
|
RUN_DEPENDS-docs=
|
2005-04-09 13:04:17 -04:00
|
|
|
|
2010-06-25 13:39:12 -04:00
|
|
|
# REGRESSION testing is currently borked. Builds, runs
|
|
|
|
# tests fail. Fix one day.
|
|
|
|
NO_REGRESS= Yes
|
|
|
|
#REGRESS_TARGET= test
|
|
|
|
#.ifmake regress
|
|
|
|
#CONFIGURE_ARGS+= --enable-socket-wrapper \
|
2011-09-26 05:32:12 -04:00
|
|
|
# --enable-nss-wrapper
|
2010-06-25 13:39:12 -04:00
|
|
|
#.endif
|
2005-04-03 07:20:37 -04:00
|
|
|
|
2010-04-26 13:31:57 -04:00
|
|
|
WRKDIST= ${WRKDIR}/${DISTNAME}/source3
|
2005-04-03 07:20:37 -04:00
|
|
|
|
2010-04-26 13:31:57 -04:00
|
|
|
SAMBA_DOCS= ${WRKSRC}/../README \
|
2011-09-26 05:32:12 -04:00
|
|
|
${WRKSRC}/../docs/history \
|
|
|
|
${WRKSRC}/../docs/registry/*.reg
|
2005-04-03 07:20:37 -04:00
|
|
|
|
|
|
|
SAMPLE_CONFIG= ${PREFIX}/share/examples/samba/smb.conf.default
|
|
|
|
|
2010-03-05 04:01:45 -05:00
|
|
|
SAMBA_MANPAGES= ${WRKSRC}/../docs/manpages
|
|
|
|
|
2010-04-26 13:31:57 -04:00
|
|
|
post-patch:
|
2010-07-14 03:20:18 -04:00
|
|
|
@cd ${WRKSRC}; \
|
2010-04-26 13:31:57 -04:00
|
|
|
AUTOCONF_VERSION=${AUTOCONF_VERSION} \
|
|
|
|
./autogen.sh
|
|
|
|
|
2007-04-06 10:20:35 -04:00
|
|
|
pre-configure:
|
2010-04-26 13:31:57 -04:00
|
|
|
@${SUBST_CMD} ${SAMBA_MANPAGES}/swat.8
|
2007-04-06 10:20:35 -04:00
|
|
|
|
2008-03-18 05:15:50 -04:00
|
|
|
post-extract:
|
2008-07-11 07:40:33 -04:00
|
|
|
@cp ${FILESDIR}/krb5-config ${WRKDIR}/bin
|
|
|
|
@chmod a+x ${WRKDIR}/bin/krb5-config
|
2008-03-18 05:15:50 -04:00
|
|
|
|
2005-04-03 07:20:37 -04:00
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/samba/pdf
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/samba/htmldocs
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/samba
|
|
|
|
@cp -R ${WRKSRC}/../examples/* ${PREFIX}/share/examples/samba
|
|
|
|
@chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/examples/samba
|
2008-07-12 08:33:21 -04:00
|
|
|
@find ${PREFIX}/share/examples/samba -type f | \
|
|
|
|
xargs chmod ${SHAREMODE}
|
|
|
|
@find ${PREFIX}/share/examples/samba -type d | \
|
|
|
|
xargs chmod ${DIRMODE}
|
2005-04-03 07:20:37 -04:00
|
|
|
@for i in ${SAMBA_DOCS}; do \
|
|
|
|
${INSTALL_DATA} $$i ${PREFIX}/share/doc/samba ; \
|
|
|
|
done
|
|
|
|
@for i in ${WRKSRC}/../docs/*.pdf ; do \
|
|
|
|
${INSTALL_DATA} $$i ${PREFIX}/share/doc/samba/pdf ; \
|
|
|
|
done
|
|
|
|
@for i in ${WRKSRC}/../docs/htmldocs/* ; do \
|
|
|
|
if [ -f $$i ]; then \
|
|
|
|
${INSTALL_DATA} $$i ${PREFIX}/share/doc/samba/htmldocs ;\
|
|
|
|
fi \
|
|
|
|
done
|
|
|
|
@sed -e 's:/usr/spool/samba:/var/spool/samba:g' \
|
|
|
|
-e 's:/usr/local/samba/var/log:${SAMBA_LOGDIR}/smbd:g' \
|
2010-07-23 08:01:47 -04:00
|
|
|
-e 's:MYGROUP:WORKGROUP:' \
|
2005-04-03 07:20:37 -04:00
|
|
|
${WRKSRC}/../examples/smb.conf.default > ${SAMPLE_CONFIG}
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh \
|
|
|
|
${PREFIX}/bin/mksmbpasswd
|
|
|
|
@chown ${BINOWN}:${BINGRP} ${PREFIX}/bin/smbpasswd
|
2006-01-03 16:21:52 -05:00
|
|
|
@ln -s samba/libsmbclient.so.${LIBsmbclient_VERSION} \
|
|
|
|
${PREFIX}/lib/libsmbclient.so.${LIBsmbclient_VERSION}
|
2010-04-26 13:31:57 -04:00
|
|
|
@ln -s samba/libsmbsharemodes.so.${LIBsmbsharemodes_VERSION} \
|
|
|
|
${PREFIX}/lib/libsmbsharemodes.so.${LIBsmbsharemodes_VERSION}
|
|
|
|
@ln -s samba/libnetapi.so.${LIBnetapi_VERSION} \
|
|
|
|
${PREFIX}/lib/libnetapi.so.${LIBnetapi_VERSION}
|
|
|
|
@ln -s samba/libwbclient.so.${LIBwbclient_VERSION} \
|
|
|
|
${PREFIX}/lib/libwbclient.so.${LIBwbclient_VERSION}
|
2006-10-20 09:21:33 -04:00
|
|
|
@rmdir ${WRKINST}${SYSCONFDIR}/samba
|
2006-10-03 10:07:10 -04:00
|
|
|
@rmdir ${WRKINST}/var/spool/samba
|
2005-04-03 07:20:37 -04:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|