2004-01-20 13:18:15 +01:00
|
|
|
# $NetBSD: Makefile,v 1.112 2004/01/20 12:22:21 agc Exp $
|
2004-01-11 03:26:30 +01:00
|
|
|
|
|
|
|
DISTNAME= samba-3.0.1
|
2004-01-12 04:33:04 +01:00
|
|
|
PKGREVISION= 1
|
2004-01-11 03:26:30 +01:00
|
|
|
CATEGORIES= net
|
|
|
|
MASTER_SITES= ftp://ftp.samba.org/pub/samba/ \
|
|
|
|
ftp://ring.asahi-net.or.jp/pub/net/samba/ \
|
|
|
|
ftp://samba.anu.edu.au/pub/samba/ \
|
|
|
|
ftp://ftp.sunet.se/pub/unix/utilities/samba/
|
|
|
|
COUNTRY_MIRRORS= au1 ca fi fr de it pl ru sg se us1 us6
|
|
|
|
.for COUNTRY in ${COUNTRY_MIRRORS}
|
|
|
|
MASTER_SITES+= ftp://${COUNTRY}.samba.org/pub/samba/
|
|
|
|
.endfor
|
|
|
|
EXTRACT_SUFX= .tar.bz2
|
|
|
|
|
|
|
|
MAINTAINER= jlam@NetBSD.org
|
2001-05-14 20:56:15 +02:00
|
|
|
HOMEPAGE= http://www.samba.org/
|
2004-01-11 03:26:30 +01:00
|
|
|
COMMENT= SMB/CIFS protocol server suite
|
2001-05-14 20:56:15 +02:00
|
|
|
|
2004-01-12 04:33:04 +01:00
|
|
|
CONFLICTS+= pam-smbpass-[0-9]* winbind-[0-9]*
|
2002-08-25 23:48:57 +02:00
|
|
|
|
2004-01-11 03:26:30 +01:00
|
|
|
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
2002-07-31 01:05:12 +02:00
|
|
|
|
2004-01-20 13:18:15 +01:00
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}/source
|
2004-01-11 03:26:30 +01:00
|
|
|
USE_BUILDLINK3= yes
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CONFIGURE_ENV+= PERL="${PERL5}"
|
2004-01-12 04:33:04 +01:00
|
|
|
PLIST_SRC= ${PKGDIR}/PLIST
|
2004-01-11 03:26:30 +01:00
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
PKG_SYSCONFSUBDIR?= samba
|
|
|
|
PKG_SYSCONFVAR= samba
|
|
|
|
|
|
|
|
SAMBA_ETCDIR?= ${PKG_SYSCONFDIR}
|
|
|
|
SAMBA_LIBDIR?= ${PREFIX}/lib/samba
|
|
|
|
SAMBA_LOCKDIR?= ${SAMBA_VARDIR}/db/samba
|
|
|
|
SAMBA_LOGDIR?= ${SAMBA_VARDIR}/log
|
|
|
|
SAMBA_PIDDIR?= ${SAMBA_VARDIR}/run
|
|
|
|
SAMBA_PRIVATE?= ${SAMBA_ETCDIR}/private
|
|
|
|
SAMBA_VARDIR?= /var
|
|
|
|
|
|
|
|
FILES_SUBST= SAMBA_ETCDIR=${SAMBA_ETCDIR}
|
|
|
|
FILES_SUBST+= SAMBA_LOCKDIR=${SAMBA_LOCKDIR}
|
|
|
|
FILES_SUBST+= SAMBA_LOGDIR=${SAMBA_LOGDIR}
|
|
|
|
FILES_SUBST+= SAMBA_PIDDIR=${SAMBA_PIDDIR}
|
|
|
|
FILES_SUBST+= SAMBA_PRIVATE=${SAMBA_PRIVATE}
|
|
|
|
FILES_SUBST+= SAMBA_VARDIR=${SAMBA_VARDIR}
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --with-configdir=${SAMBA_ETCDIR}
|
|
|
|
CONFIGURE_ARGS+= --with-lockdir=${SAMBA_LOCKDIR}
|
|
|
|
CONFIGURE_ARGS+= --with-logfilebase=${SAMBA_LOGDIR}
|
|
|
|
CONFIGURE_ARGS+= --with-piddir=${SAMBA_PIDDIR}
|
|
|
|
CONFIGURE_ARGS+= --with-privatedir=${SAMBA_PRIVATE}
|
|
|
|
CONFIGURE_ARGS+= --localstatedir=${SAMBA_VARDIR}
|
|
|
|
CONFIGURE_ARGS+= --libdir=${SAMBA_LIBDIR}
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --with-swatdir=${PREFIX}/share/samba/swat
|
|
|
|
CONFIGURE_ARGS+= --with-libsmbclient
|
|
|
|
CONFIGURE_ARGS+= --with-winbind
|
|
|
|
|
|
|
|
.include "../../converters/libiconv/buildlink3.mk"
|
|
|
|
CONFIGURE_ARGS+= --with-libiconv=${BUILDLINK_PREFIX.iconv}
|
|
|
|
|
|
|
|
BUILDLINK_USE_BUILTIN.readline= no
|
|
|
|
.include "../../devel/readline/buildlink3.mk"
|
|
|
|
CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.readline}
|
2001-06-19 11:03:30 +02:00
|
|
|
|
2004-01-11 03:26:30 +01:00
|
|
|
.if defined(SAMBA_WITH_ADS) && !empty(SAMBA_WITH_ADS:M[yY][eE][sS])
|
|
|
|
. include "../../mk/krb5.buildlink3.mk"
|
|
|
|
SAMBA_USE_LDAP= yes
|
|
|
|
CONFIGURE_ARGS+= --with-ads
|
|
|
|
CONFIGURE_ARGS+= --with-krb5=${KRB5BASE}
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-ads
|
|
|
|
CONFIGURE_ARGS+= --without-krb5
|
|
|
|
.endif
|
|
|
|
BUILD_DEFS+= SAMBA_WITH_ADS
|
2003-06-04 08:12:21 +02:00
|
|
|
|
2004-01-11 03:26:30 +01:00
|
|
|
.if defined(USE_CUPS) && !empty(USE_CUPS:M[yY][eE][sS])
|
|
|
|
. include "../../print/cups/buildlink3.mk"
|
2002-06-22 23:31:29 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-cups
|
2004-01-17 13:19:51 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-cups
|
2001-05-14 20:56:15 +02:00
|
|
|
.endif
|
2004-01-11 03:26:30 +01:00
|
|
|
BUILD_DEFS+= USE_CUPS
|
2001-05-14 20:56:15 +02:00
|
|
|
|
|
|
|
.if defined(USE_PAM)
|
2004-01-12 04:33:04 +01:00
|
|
|
. include "../../security/PAM/module.mk"
|
2001-05-14 20:56:15 +02:00
|
|
|
CONFIGURE_ARGS+= --with-pam
|
2004-01-12 04:33:04 +01:00
|
|
|
CONFIGURE_ARGS+= --with-pam_smbpass
|
|
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.pam
|
2000-05-17 11:22:28 +02:00
|
|
|
.endif
|
2004-01-11 03:26:30 +01:00
|
|
|
BUILD_DEFS+= USE_PAM
|
2000-05-17 11:22:28 +02:00
|
|
|
|
2004-01-11 03:26:30 +01:00
|
|
|
.if defined(SAMBA_USE_LDAP) && !empty(SAMBA_USE_LDAP:M[yY][eE][sS])
|
|
|
|
. include "../../databases/openldap/buildlink3.mk"
|
|
|
|
CONFIGURE_ARGS+= --with-ldap
|
|
|
|
. if defined(SAMBA_USE_LDAP_COMPAT) && \
|
|
|
|
!empty(SAMBA_USE_LDAP_COMPAT:M[yY][eE][sS])
|
2002-02-04 11:31:49 +01:00
|
|
|
CONFIGURE_ARGS+= --with-ldapsam
|
2004-01-11 03:26:30 +01:00
|
|
|
. endif
|
2002-02-04 11:31:49 +01:00
|
|
|
.else
|
2004-01-11 03:26:30 +01:00
|
|
|
CONFIGURE_ARGS+= --without-ldap
|
2002-02-04 11:31:49 +01:00
|
|
|
.endif
|
2004-01-11 03:26:30 +01:00
|
|
|
BUILD_DEFS+= SAMBA_USE_LDAP
|
|
|
|
BUILD_DEFS+= SAMBA_USE_LDAP_COMPAT
|
2001-11-21 17:44:17 +01:00
|
|
|
|
2003-09-15 00:25:25 +02:00
|
|
|
.if !defined(MKTEMP)
|
2003-10-11 13:42:11 +02:00
|
|
|
MKTEMP!= ${TYPE} mktemp 2>&1 | \
|
2003-09-15 00:25:25 +02:00
|
|
|
${AWK} '/not found/ { print "mktemp"; exit } { print $$3 }'
|
|
|
|
MAKEFLAGS+= MKTEMP="${MKTEMP}"
|
|
|
|
.endif
|
|
|
|
.if !defined(PWD_MKDB)
|
2003-10-11 13:42:11 +02:00
|
|
|
PWD_MKDB!= ${TYPE} pwd_mkdb 2>&1 | \
|
2003-09-15 00:25:25 +02:00
|
|
|
${AWK} '/not found/ { print "pwd_mkdb"; exit } { print $$3 }'
|
|
|
|
MAKEFLAGS+= PWD_MKDB="${PWD_MKDB}"
|
|
|
|
.endif
|
|
|
|
FILES_SUBST+= MKTEMP=${MKTEMP:Q}
|
|
|
|
FILES_SUBST+= PWD_MKDB=${PWD_MKDB:Q}
|
|
|
|
|
2004-01-11 03:26:30 +01:00
|
|
|
DOCDIR= ${PREFIX}/share/doc/${PKGBASE}
|
|
|
|
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
|
|
|
|
|
|
|
|
USE_PKGINSTALL= yes
|
|
|
|
CONF_FILES= ${EGDIR}/smb.conf.default ${SAMBA_ETCDIR}/smb.conf
|
|
|
|
SUPPORT_FILES_PERMS= ${EGDIR}/adduser.sh ${SAMBA_ETCDIR}/adduser \
|
|
|
|
${ROOT_USER} ${ROOT_GROUP} 0755
|
|
|
|
SUPPORT_FILES_PERMS+= ${EGDIR}/deluser.sh ${SAMBA_ETCDIR}/deluser \
|
|
|
|
${ROOT_USER} ${ROOT_GROUP} 0755
|
2004-01-12 04:33:04 +01:00
|
|
|
MAKE_DIRS= ${SAMBA_VARDIR} ${SAMBA_LOGDIR} ${SAMBA_PIDDIR}
|
|
|
|
OWN_DIRS= ${SAMBA_ETCDIR} ${SAMBA_LOCKDIR}
|
2004-01-11 03:26:30 +01:00
|
|
|
OWN_DIRS_PERMS= ${SAMBA_PRIVATE} ${ROOT_USER} ${ROOT_GROUP} 0700
|
|
|
|
RCD_SCRIPTS= samba nmbd smbd winbindd
|
2001-05-24 10:53:54 +02:00
|
|
|
|
2004-01-12 04:33:04 +01:00
|
|
|
INSTALL_LIBRARY= \
|
|
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
|
|
|
|
|
2003-09-15 00:25:25 +02:00
|
|
|
post-build:
|
|
|
|
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/adduser.sh > ${WRKDIR}/adduser.sh
|
|
|
|
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/deluser.sh > ${WRKDIR}/deluser.sh
|
|
|
|
|
1997-12-24 11:32:01 +01:00
|
|
|
post-install:
|
2003-04-10 13:58:55 +02:00
|
|
|
${INSTALL_DATA_DIR} ${DOCDIR}
|
2004-01-12 04:33:04 +01:00
|
|
|
${INSTALL_LIBRARY} ${WRKSRC}/nsswitch/libnss_winbind.so ${PREFIX}/lib
|
|
|
|
${INSTALL_LIBRARY} ${WRKSRC}/nsswitch/libnss_wins.so ${PREFIX}/lib
|
2004-01-11 03:26:30 +01:00
|
|
|
cd ${WRKSRC}/../docs/Registry; for file in *.reg; do \
|
|
|
|
${INSTALL_DATA} $$file ${DOCDIR}/$$file; \
|
2003-06-04 08:12:21 +02:00
|
|
|
done
|
2004-01-11 03:26:30 +01:00
|
|
|
${INSTALL_DATA_DIR} ${EGDIR}
|
|
|
|
${INSTALL_SCRIPT} ${WRKDIR}/adduser.sh ${EGDIR}/adduser.sh
|
|
|
|
${INSTALL_SCRIPT} ${WRKDIR}/deluser.sh ${EGDIR}/deluser.sh
|
|
|
|
cd ${WRKSRC}/../examples; ${INSTALL_DATA} LDAP/samba.schema ${EGDIR}
|
|
|
|
cd ${WRKSRC}/../examples; ${INSTALL_DATA} smb.conf.default ${EGDIR}
|
|
|
|
cd ${WRKSRC}/script; ${INSTALL_SCRIPT} mknissmbpasswd.sh ${EGDIR}
|
|
|
|
cd ${WRKSRC}/script; ${INSTALL_SCRIPT} mknissmbpwdtbl.sh ${EGDIR}
|
|
|
|
cd ${WRKSRC}/script; ${INSTALL_SCRIPT} mksmbpasswd.sh ${EGDIR}
|
|
|
|
cd ${WRKSRC}/script; ${INSTALL_SCRIPT} updatesmbpasswd.sh ${EGDIR}
|
2004-01-12 04:33:04 +01:00
|
|
|
.if defined(USE_PAM)
|
|
|
|
${INSTALL_DATA_DIR} ${PAM_INSTMODULEDIR}
|
|
|
|
${INSTALL_LIBRARY} ${WRKSRC}/bin/pam_smbpass.so ${PAM_INSTMODULEDIR}
|
|
|
|
${INSTALL_LIBRARY} ${WRKSRC}/nsswitch/pam_winbind.so ${PAM_INSTMODULEDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/pam_smbpass/README \
|
|
|
|
${DOCDIR}/README.pam_smbpass
|
|
|
|
${INSTALL_DATA_DIR} ${EGDIR}/pam_smbpass
|
|
|
|
cd ${WRKSRC}/pam_smbpass/samples; for file in [a-z]*; do \
|
|
|
|
${INSTALL_DATA} $${file} ${EGDIR}/pam_smbpass/$${file}; \
|
|
|
|
done
|
|
|
|
.endif
|
2002-06-22 23:31:29 +02:00
|
|
|
|
1998-04-15 12:38:15 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|