pkgsrc/net/samba/Makefile
uebayasi cd99dbc1be ${INSTALL_DATA} can't create two directories at once on Solaris.
Addresses PR21086 by Rob Quinn <rquinn at sec dot sprint dot net>.
2003-04-10 11:58:55 +00:00

95 lines
2.9 KiB
Makefile

# $NetBSD: Makefile,v 1.96 2003/04/10 11:58:55 uebayasi Exp $
.include "Makefile.common"
MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.samba.org/
COMMENT= SMB/CIFS protocol server suite for UNIX
USE_BUILDLINK2= yes
USE_PKGINSTALL= yes
USE_GNU_READLINE= # uses rl_event_hook interface to GNU readline
CONFIGURE_ARGS+= --with-readline
CONFIGURE_ARGS+= --with-ssl
CONFIGURE_ARGS+= --with-sslinc=${SSLBASE}
CFLAGS+= -I${SSLBASE}/include/openssl # ssl.h, err.h
.if defined(USE_CUPS) && (${USE_CUPS} == "YES")
.include "../../print/cups/buildlink2.mk"
BUILD_DEFS+= USE_CUPS
CONFIGURE_ARGS+= --enable-cups
.endif
.if defined(USE_PAM)
.include "../../security/PAM/buildlink2.mk"
BUILD_DEFS+= USE_PAM
CONFIGURE_ARGS+= --with-pam
.endif
.if defined(SAMBA_USE_LDAP) && ${SAMBA_USE_LDAP} == "YES"
.include "../../databases/openldap/buildlink2.mk"
BUILD_DEFS+= SAMBA_USE_LDAP
CONFIGURE_ARGS+= --with-ldapsam
PLIST_SUBST+= SAMBA_LDAP=""
.else
PLIST_SUBST+= SAMBA_LDAP="@comment "
MESSAGE_SRC= ${.CURDIR}/MESSAGE.smbpasswd
SMBPASSWD_FILE= /dev/null ${SAMBA_PRIVATE}/smbpasswd \
${ROOT_USER} ${ROOT_GROUP} 0600
.endif
# Microsoft DFS support
CONFIGURE_ARGS+= --with-msdfs
MESSAGE_SUBST+= SAMBA_PRIVATE=${SAMBA_PRIVATE}
MESSAGE_SUBST+= ROOT_GROUP=${ROOT_GROUP}
MESSAGE_SUBST+= ROOT_USER=${ROOT_USER}
DOCDIR= ${PREFIX}/share/doc/${PKGBASE}
HTMLDIR= ${PREFIX}/share/doc/html/${PKGBASE}
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGBASE}
CONF_FILES= ${EXAMPLESDIR}/smb.conf.default ${SAMBA_ETCDIR}/smb.conf
SUPPORT_FILES_PERMS= ${SMBPASSWD_FILE}
RCD_SCRIPTS= samba nmbd smbd
OWN_DIRS= ${SAMBA_ETCDIR} ${SAMBA_LOCKDIR}
OWN_DIRS_PERMS= ${SAMBA_PRIVATE} ${ROOT_USER} ${ROOT_GROUP} 0500
# Remove irrelevant files for this package.
post-extract:
${FIND} ${WRKDIR}/${DISTNAME} -name ".cvsignore" -print | \
${XARGS} ${RM} -f
${RM} -r ${WRKDIR}/${DISTNAME}/docs/textdocs/outdated
${RM} -r ${WRKDIR}/${DISTNAME}/examples/VFS
${RM} -r ${WRKDIR}/${DISTNAME}/examples/appliance
${RM} -r ${WRKDIR}/${DISTNAME}/examples/autofs
${RM} -r ${WRKDIR}/${DISTNAME}/examples/dce-dfs
${RM} -r ${WRKDIR}/${DISTNAME}/examples/libsmbclient
${RM} -r ${WRKDIR}/${DISTNAME}/examples/svr4-startup
post-install:
# Install Samba documentation.
${INSTALL_DATA_DIR} ${DOCDIR}
${INSTALL_DATA_DIR} ${HTMLDIR}
cd ${WRKDIR}/${DISTNAME}/docs; \
${INSTALL_DATA} announce textdocs/* ${DOCDIR}; \
${INSTALL_DATA} Registry/*.reg ${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} ${WRKSRC}/script/convert_smbpasswd \
${EXAMPLESDIR}/misc
${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh \
${PREFIX}/sbin/mksmbpasswd
.include "../../devel/readline/buildlink2.mk"
.include "../../security/openssl/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"