2007-07-02 17:56:57 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.85 2007/07/02 21:56:57 mbalmer Exp $
|
2001-04-10 07:33:46 -04:00
|
|
|
|
2006-11-25 08:00:41 -05:00
|
|
|
COMMENT-main= "SMB and CIFS client and server for UNIX"
|
2005-04-03 07:20:37 -04:00
|
|
|
COMMENT-docs= "documentation and examples for samba"
|
1999-03-19 04:06:04 -05:00
|
|
|
|
2007-07-02 17:56:57 -04:00
|
|
|
DISTNAME= samba-3.0.25b
|
|
|
|
PKGNAME-main= ${DISTNAME}
|
2005-10-13 17:00:38 -04:00
|
|
|
FULLPKGNAME-docs= ${DISTNAME:S/-/-docs-/}
|
2007-05-28 16:03:01 -04:00
|
|
|
SHARED_LIBS= smbclient 1.0 \
|
|
|
|
msrpc 1.0
|
2005-04-03 07:20:37 -04:00
|
|
|
|
|
|
|
CATEGORIES= net
|
|
|
|
|
|
|
|
HOMEPAGE= http://www.samba.org/
|
|
|
|
|
|
|
|
MAINTAINER= Marc Balmer <mbalmer@openbsd.org>
|
|
|
|
|
|
|
|
# GPL
|
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
|
|
|
|
WANTLIB= c ncurses readline
|
|
|
|
|
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
|
|
|
|
|
|
|
MODULES= converters/libiconv
|
|
|
|
|
|
|
|
LIB_DEPENDS= popt::devel/popt
|
|
|
|
|
2006-01-03 16:21:52 -05:00
|
|
|
MAKE_FLAGS= PASSWD_PROGRAM="/usr/bin/passwd" \
|
2006-02-02 04:40:43 -05:00
|
|
|
LIBsmbclient_VERSION=${LIBsmbclient_VERSION} \
|
|
|
|
LIBmsrpc_VERSION=${LIBmsrpc_VERSION}
|
2006-01-03 16:21:52 -05:00
|
|
|
FAKE_FLAGS= DESTDIR="${DESTDIR}" \
|
2006-02-02 04:40:43 -05:00
|
|
|
LIBsmbclient_VERSION=${LIBsmbclient_VERSION} \
|
|
|
|
LIBmsrpc_VERSION=${LIBmsrpc_VERSION}
|
|
|
|
|
2005-04-03 07:20:37 -04:00
|
|
|
CONFDIR= ${SYSCONFDIR}/samba
|
|
|
|
SAMBA_LOGDIR= /var/log
|
2006-12-14 04:07:55 -05:00
|
|
|
SUBST_VARS= CONFDIR LOCALBASE SYSCONFDIR
|
2005-04-03 07:20:37 -04:00
|
|
|
|
|
|
|
SEPARATE_BUILD= concurrent
|
2007-05-28 16:03:01 -04:00
|
|
|
CONFIGURE_STYLE= gnu
|
2005-05-27 00:54:40 -04:00
|
|
|
CONFIGURE_ARGS= --localstatedir="/var" \
|
2005-04-03 07:20:37 -04:00
|
|
|
--sbindir="${PREFIX}/libexec" \
|
|
|
|
--with-configdir="${CONFDIR}" \
|
2005-05-27 00:54:40 -04:00
|
|
|
--with-libdir="${PREFIX}/lib/samba" \
|
2005-04-03 07:20:37 -04:00
|
|
|
--with-lockdir="/var/spool/samba" \
|
|
|
|
--with-piddir="/var/run" \
|
|
|
|
--with-logfilebase="${SAMBA_LOGDIR}" \
|
|
|
|
--with-privatedir="${CONFDIR}" \
|
|
|
|
--with-libsmbclient \
|
|
|
|
--with-swatdir="${PREFIX}/share/swat" \
|
|
|
|
--with-ssl \
|
|
|
|
--with-sslinc="/usr/include/ssl" \
|
2005-09-12 12:57:39 -04:00
|
|
|
--with-ssllib="/usr/lib" \
|
2006-10-29 07:55:50 -05:00
|
|
|
--with-syslog \
|
2005-09-12 12:57:39 -04:00
|
|
|
--with-utmp
|
2005-04-03 07:20:37 -04:00
|
|
|
|
|
|
|
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
2006-08-09 08:54:04 -04:00
|
|
|
LDFLAGS="-L${LOCALBASE}/lib -Wl,--export-dynamic"
|
2005-04-03 07:20:37 -04:00
|
|
|
|
|
|
|
FLAVORS= cups ldap
|
|
|
|
FLAVOR?=
|
|
|
|
|
2006-11-25 08:00:41 -05:00
|
|
|
MULTI_PACKAGES= -main -docs
|
2005-04-03 07:20:37 -04:00
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mcups}
|
|
|
|
CONFIGURE_ARGS+= --enable-cups
|
|
|
|
LIB_DEPENDS+= cups::print/cups
|
2007-03-29 18:12:06 -04:00
|
|
|
WANTLIB+= ssl crypto m pthread z
|
2005-04-03 07:20:37 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-cups
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mldap}
|
|
|
|
CONFIGURE_ARGS+= --with-ldap --without-ads
|
2006-11-11 10:16:24 -05:00
|
|
|
LIB_DEPENDS+= ldap,lber::databases/openldap
|
2006-11-20 15:00:04 -05:00
|
|
|
BUILD_DEPENDS+= ::misc/libutf8
|
2005-04-03 07:20:37 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-ldap --without-ads
|
|
|
|
.endif
|
|
|
|
|
2006-11-25 08:00:41 -05:00
|
|
|
PKG_ARCH-docs= *
|
|
|
|
LIB_DEPENDS-docs=
|
|
|
|
WANTLIB-docs=
|
|
|
|
RUN_DEPENDS-docs=
|
2005-04-09 13:04:17 -04:00
|
|
|
|
2005-04-03 07:20:37 -04:00
|
|
|
NO_REGRESS= Yes
|
|
|
|
|
|
|
|
WRKDIST= ${WRKDIR}/${DISTNAME}/source
|
|
|
|
|
|
|
|
SAMBA_DOCS=${WRKSRC}/../README \
|
|
|
|
${WRKSRC}/../docs/THANKS \
|
|
|
|
${WRKSRC}/../docs/history \
|
|
|
|
${WRKSRC}/../docs/registry/*.reg
|
|
|
|
|
|
|
|
SAMPLE_CONFIG= ${PREFIX}/share/examples/samba/smb.conf.default
|
|
|
|
|
2007-04-06 10:20:35 -04:00
|
|
|
pre-configure:
|
|
|
|
@perl -pi -e 's,!!SYSCONFDIR!!,${SYSCONFDIR},g;' \
|
|
|
|
-e 's,!!LOCALBASE!!,${LOCALBASE},g' \
|
|
|
|
${WRKSRC}/../docs/manpages/swat.8
|
|
|
|
|
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
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/README.OpenBSD ${PREFIX}/share/doc/samba
|
|
|
|
@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' \
|
|
|
|
${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}
|
2006-02-02 04:40:43 -05:00
|
|
|
@ln -s samba/libmsrpc.so.${LIBmsrpc_VERSION} \
|
|
|
|
${PREFIX}/lib/libmsrpc.so.${LIBmsrpc_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>
|