openbsd-ports/net/samba/Makefile
mbalmer 3852646478 Update to Samba 3.0.13.
ok alek@, espie@, pval@, xsa@
2005-04-03 11:20:37 +00:00

120 lines
3.3 KiB
Makefile

# $OpenBSD: Makefile,v 1.50 2005/04/03 11:20:37 mbalmer Exp $
COMMENT= "SMB and CIFS client and server for UNIX"
COMMENT-docs= "documentation and examples for samba"
DISTNAME= samba-3.0.13
FULLPKGNAME-docs= ${DISTNAME:S/-/-docs-/}
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
MASTER_SITES= http://us2.samba.org/samba/ftp/
MODULES= converters/libiconv
LIB_DEPENDS= popt::devel/popt
MAKE_FLAGS= PASSWD_PROGRAM="/usr/bin/passwd"
FAKE_FLAGS= prefix="${WRKINST}${PREFIX}" \
BASEDIR="${PREFIX}" \
LIBDIR="${WRKINST}${PREFIX}/lib/samba" \
PIDDIR="${WRKINST}/var/run" \
SWATDIR="${WRKINST}${PREFIX}/share/swat" \
SBINDIR="${WRKINST}${PREFIX}/libexec" \
VARDIR="${WRKINST}/var"
CONFDIR= ${SYSCONFDIR}/samba
SAMBA_LOGDIR= /var/log
SUBST_VARS= CONFDIR
SEPARATE_BUILD= concurrent
AUTOCONF_VERSION= 2.59
CONFIGURE_STYLE= autoconf
CONFIGURE_ARGS= --libdir="${PREFIX}/lib/samba" \
--localstatedir="/var" \
--sbindir="${PREFIX}/libexec" \
--with-configdir="${CONFDIR}" \
--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" \
--with-ssllib="/usr/lib"
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
FLAVORS= cups ldap
FLAVOR?=
MULTI_PACKAGES= -docs
.if ${FLAVOR:L:Mcups}
CONFIGURE_ARGS+= --enable-cups
LIB_DEPENDS+= cups::print/cups
WANTLIB+= crypto ssl
.else
CONFIGURE_ARGS+= --disable-cups
.endif
.if ${FLAVOR:L:Mldap}
CONFIGURE_ARGS+= --with-ldap --without-ads
LIB_DEPENDS+= ldap,lber::databases/openldap \
utf8::misc/libutf8
.else
CONFIGURE_ARGS+= --without-ldap --without-ads
.endif
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
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
.include <bsd.port.mk>