# $NetBSD: Makefile,v 1.2 2001/08/22 15:42:19 jlam Exp $ DISTNAME= samba-2.0.10 WRKSRC= ${WRKDIR}/${DISTNAME}/source CATEGORIES= net MASTER_SITES= ftp://ftp.samba.org/pub/samba/old-versions/ \ ftp://samba.anu.edu.au/pub/samba/old-versions/ \ ftp://de.samba.org/samba.org/ MAINTAINER= jlam@netbsd.org HOMEPAGE= http://www.samba.org/ COMMENT= SMB/CIFS protocol server suite for UNIX BUILD_USES_MSGFMT= # defined GNU_CONFIGURE= # defined USE_BUILDLINK_ONLY= # defined .include "../../mk/bsd.prefs.mk" SAMPLE_CONFIG= ${PREFIX}/share/examples/samba/smb.conf.sample SAMBA_LOGDIR?= /var/log SAMBA_LOCKDIR?= /var/run/samba SAMBA_ETCDIR?= /etc/samba SAMBA_PRIVATE?= ${SAMBA_ETCDIR}/private SAMBA_DATADIR?= ${PREFIX}/share MAKE_ENV+= CONFIGDIR=${SAMBA_ETCDIR} CONFIGURE_ARGS+= --localstatedir=${SAMBA_LOGDIR} CONFIGURE_ARGS+= --with-lockdir=${SAMBA_LOCKDIR} CONFIGURE_ARGS+= --with-privatedir=${SAMBA_PRIVATE} CONFIGURE_ARGS+= --with-swatdir=${PREFIX}/share/swat CONFIGURE_ARGS+= --with-sambabook=${PREFIX}/share/swat/using_samba CONFIGURE_ARGS+= --with-ssl CONFIGURE_ARGS+= --with-sslinc=${BUILDLINK_DIR} CFLAGS+= -I${BUILDLINK_DIR}/include/openssl # ssl.h, err.h .if defined(SAMBA_WITH_CUPS) .include "../../print/cups/buildlink.mk" .endif .if defined(USE_PAM) .include "../../security/PAM/buildlink.mk" CONFIGURE_ARGS+= --with-pam .endif # The following are Linux-only options. CONFIGURE_ARGS+= --without-smbwrapper CONFIGURE_ARGS+= --without-smbmount INSTALL_FILE= ${WRKDIR}/INSTALL DEINSTALL_FILE= ${WRKDIR}/DEINSTALL DOCDIR= ${PREFIX}/share/doc/samba HTMLDIR= ${PREFIX}/share/doc/html/samba EXAMPLESDIR= ${PREFIX}/share/examples/samba FILES_SUBST= SAMBA_PRIVATE=${SAMBA_PRIVATE} FILES_SUBST+= SAMBA_LOCKDIR=${SAMBA_LOCKDIR} FILES_SUBST+= SAMBA_LOGDIR=${SAMBA_LOGDIR} FILES_SUBST+= SAMBA_ETCDIR=${SAMBA_ETCDIR} FILES_SUBST+= PREFIX=${PREFIX} FILES_SUBST+= CAT=${CAT:Q} FILES_SUBST+= CHMOD=${CHMOD:Q} FILES_SUBST+= CHOWN=${CHOWN:Q} FILES_SUBST+= CMP=${CMP:Q} FILES_SUBST+= CP=${CP:Q} FILES_SUBST+= ECHO=${ECHO:Q} FILES_SUBST+= MKDIR=${MKDIR:Q} FILES_SUBST+= RM=${RM:Q} FILES_SUBST+= RMDIR=${RMDIR:Q} FILES_SUBST+= TRUE=${TRUE:Q} FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} MESSAGE_SUBST+= ETCDIR=${SAMBA_ETCDIR} pre-install: ${SED} ${FILES_SUBST_SED} ${FILESDIR}/samba.sh > ${WRKDIR}/samba.sh ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} post-install: # Install Samba documentation. # ${INSTALL_DATA_DIR} ${DOCDIR} ${HTMLDIR} cd ${WRKDIR}/${DISTNAME}/docs; \ ${INSTALL_DATA} announce *.reg textdocs/* ${DOCDIR}; \ ${INSTALL_DATA} faq/*.html ${HTMLDIR} # Install Samba examples. # ${INSTALL_DATA_DIR} ${EXAMPLESDIR} ${CP} -R ${WRKDIR}/${DISTNAME}/examples/* ${EXAMPLESDIR} ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR} ${CHMOD} -R ugo-w ${EXAMPLESDIR} ${INSTALL_SCRIPT} ${WRKDIR}/samba.sh ${PREFIX}/etc/rc.d/samba ${MV} ${PREFIX}/bin/convert_smbpasswd ${PREFIX}/sbin/convert_smbpasswd ${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh \ ${PREFIX}/sbin/mksmbpasswd ${SED} ${FILES_SUBST_SED} \ ${FILESDIR}/smb.conf.sample > ${WRKDIR}/smb.conf.sample ${INSTALL_DATA} ${WRKDIR}/smb.conf.sample ${EXAMPLESDIR} PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL .include "../../devel/gettext-lib/buildlink.mk" .include "../../devel/readline/buildlink.mk" .include "../../security/openssl/buildlink.mk" .include "../../mk/bsd.pkg.mk"