2000-01-29 00:21:39 -05:00
|
|
|
# New ports collection makefile for: samba
|
|
|
|
# Date created: 27 Dec 1999
|
|
|
|
# Whom: Shinya Sasaki <pcmaster@osk3.3web.ne.jp>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2000-04-12 10:38:12 -04:00
|
|
|
PORTNAME= samba
|
2000-08-30 00:47:06 -04:00
|
|
|
PORTVERSION= ${SAMBA_VERSION}.j${SAMBA_JA_VERSION}
|
2002-04-12 13:10:20 -04:00
|
|
|
PORTREVISION= 1
|
2000-01-29 00:21:39 -05:00
|
|
|
CATEGORIES= japanese net
|
2000-08-29 15:47:14 -04:00
|
|
|
MASTER_SITES= ftp://ftp.samba.gr.jp/pub/samba-jp/%SUBDIR%/ \
|
|
|
|
ftp://ftp.iij.ad.jp/pub/SAMBA/samba-jp/%SUBDIR%/ \
|
2002-05-17 16:50:54 -04:00
|
|
|
ftp://SunSITE.tus.ac.jp/pub/archives/packages/samba/samba-jp/%SUBDIR%/ \
|
2000-08-29 15:47:14 -04:00
|
|
|
ftp://ftp.plathome.co.jp/pub/samba/samba-jp/%SUBDIR%/ \
|
|
|
|
ftp://ftp2.samba.gr.jp/pub/samba-jp/%SUBDIR%/ \
|
|
|
|
ftp://ftp.tutrp.tut.ac.jp/pub/mirror/samba-jp/%SUBDIR%/
|
2000-08-30 00:47:06 -04:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}-${SAMBA_VERSION}-ja
|
|
|
|
DISTNAME= ${PORTNAME}-${SAMBA_VERSION}-ja-${SAMBA_JA_VERSION}
|
2000-01-29 00:21:39 -05:00
|
|
|
|
2000-08-29 15:47:14 -04:00
|
|
|
MAINTAINER= nakaji@jp.FreeBSD.org
|
|
|
|
|
2002-04-12 13:10:20 -04:00
|
|
|
BUILD_DEPENDS= msgfmt:${PORTSDIR}/devel/gettext
|
2000-01-29 00:21:39 -05:00
|
|
|
|
2002-01-19 06:05:29 -05:00
|
|
|
SAMBA_VERSION= 2.2.2
|
2002-03-27 11:06:37 -05:00
|
|
|
SAMBA_JA_VERSION= 1.1
|
2000-04-12 10:38:12 -04:00
|
|
|
|
2000-01-29 00:21:39 -05:00
|
|
|
# directories
|
|
|
|
VARDIR= /var
|
|
|
|
SAMBA_SPOOL= ${VARDIR}/spool/samba
|
|
|
|
SAMBA_LOGDIR= ${VARDIR}/log
|
|
|
|
SAMBA_PRIVATE= ${PREFIX}/private
|
|
|
|
SAMBA_CONFDIR= ${PREFIX}/etc
|
|
|
|
# sample files
|
|
|
|
STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/samba.sh.sample
|
|
|
|
SAMPLE_CONFIG= ${SAMBA_CONFDIR}/smb.conf.default
|
|
|
|
|
2000-12-07 01:54:24 -05:00
|
|
|
USE_BZIP2= yes
|
2000-01-29 00:21:39 -05:00
|
|
|
GNU_CONFIGURE= yes
|
2000-08-29 15:47:14 -04:00
|
|
|
USE_AUTOCONF= yes
|
2002-01-19 06:05:29 -05:00
|
|
|
USE_GMAKE= yes
|
2000-08-29 15:47:14 -04:00
|
|
|
CONFIGURE_ARGS= --with-i18n-swat --with-included-gettext \
|
|
|
|
--libdir=${SAMBA_CONFDIR} \
|
2000-01-29 00:21:39 -05:00
|
|
|
--localstatedir=${VARDIR} --with-swatdir=${PREFIX}/share/swat \
|
2002-01-19 06:05:29 -05:00
|
|
|
--with-lockdir=${VARDIR}/db/samba \
|
2001-02-25 23:50:26 -05:00
|
|
|
--with-privatedir=${SAMBA_PRIVATE} \
|
|
|
|
--prefix=${PREFIX}
|
2000-01-29 00:21:39 -05:00
|
|
|
|
|
|
|
.if defined(KRB5_HOME) && exists(${KRB5_HOME})
|
|
|
|
CONFIGURE_ARGS+=--with-krb5=${KRB5_HOME}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}/source
|
|
|
|
|
2002-01-19 06:05:29 -05:00
|
|
|
MAN1= findsmb.1 nmblookup.1 rpcclient.1 smbcacls.1 \
|
|
|
|
smbcontrol.1 smbstatus.1 smbclient.1 smbrun.1 smbtar.1 \
|
2000-08-29 15:47:14 -04:00
|
|
|
testparm.1 testprns.1 make_smbcodepage.1 smbsh.1 \
|
2002-01-19 06:05:29 -05:00
|
|
|
make_unicodemap.1 wbinfo.1
|
2000-01-29 00:21:39 -05:00
|
|
|
MAN5= smb.conf.5 smbpasswd.5 lmhosts.5
|
|
|
|
MAN7= samba.7
|
2002-01-19 06:05:29 -05:00
|
|
|
MAN8= smbd.8 nmbd.8 smbpasswd.8 swat.8 smbspool.8 \
|
|
|
|
smbmnt.8 smbmount.8 smbumount.8 winbindd.8
|
2000-08-29 15:47:14 -04:00
|
|
|
MANLANG= "" ja
|
2000-01-29 00:21:39 -05:00
|
|
|
|
2002-01-19 06:05:29 -05:00
|
|
|
post-build:
|
|
|
|
${SED} 's:/usr/local:${PREFIX}:g' ${FILESDIR}/samba.sh.sample \
|
|
|
|
> ${WRKDIR}/samba.sh.sample
|
2000-02-12 18:23:48 -05:00
|
|
|
|
2000-01-29 00:21:39 -05:00
|
|
|
post-install:
|
2002-01-19 06:05:29 -05:00
|
|
|
@${STRIP_CMD} ${PREFIX}/sbin/smbd ${PREFIX}/sbin/nmbd ${PREFIX}/sbin/swat
|
|
|
|
@${STRIP_CMD} ${PREFIX}/bin/smbclient ${PREFIX}/bin/smbspool
|
|
|
|
@${STRIP_CMD} ${PREFIX}/bin/testparm ${PREFIX}/bin/testprns ${PREFIX}/bin/testprns ${PREFIX}/bin/smbstatus ${PREFIX}/bin/smbcontrol ${PREFIX}/bin/make_printerdef
|
|
|
|
@${STRIP_CMD} ${PREFIX}/bin/smbpasswd ${PREFIX}/bin/make_smbcodepage ${PREFIX}/bin/rpcclient ${PREFIX}/bin/make_unicodemap ${PREFIX}/bin/make_nftable ${PREFIX}/bin/smbcacls ${PREFIX}/bin/nmblookup
|
|
|
|
@${MKDIR} ${PREFIX}/share/examples/samba
|
|
|
|
@cd ${WRKDIR}/${DISTNAME}/examples; \
|
|
|
|
${TAR} --exclude .cvsignore -cf - . | ${TAR} -xf - -C ${PREFIX}/share/examples/samba
|
2000-01-29 00:21:39 -05:00
|
|
|
@if [ ! -f ${STARTUP_SCRIPT} ]; then \
|
|
|
|
${ECHO} "Installing ${STARTUP_SCRIPT} startup file." ; \
|
2002-01-19 06:05:29 -05:00
|
|
|
${INSTALL_SCRIPT} ${WRKDIR}/samba.sh.sample \
|
2000-01-29 00:21:39 -05:00
|
|
|
${STARTUP_SCRIPT} ; \
|
|
|
|
fi
|
|
|
|
@test -d ${SAMBA_SPOOL} || ${MKDIR} ${SAMBA_SPOOL} && ${CHMOD} 1777 ${SAMBA_SPOOL}
|
2002-01-19 06:05:29 -05:00
|
|
|
@test -d ${VARDIR}/db/samba || ${MKDIR} ${VARDIR}/db/samba && ${CHMOD} 0755 ${VARDIR}/db/samba
|
2000-01-29 00:21:39 -05:00
|
|
|
@if [ ! -f ${SAMPLE_CONFIG} ]; then \
|
|
|
|
${SED} -e 's!%%SAMBA_SPOOL%%!${SAMBA_SPOOL}!' \
|
|
|
|
-e 's!%%SAMBA_LOGDIR%%!${SAMBA_LOGDIR}!' \
|
|
|
|
-e 's!%%SAMBA_CONFDIR%%!${SAMBA_CONFDIR}!' \
|
|
|
|
${FILESDIR}/smb.conf.default \
|
|
|
|
> ${SAMPLE_CONFIG} ; \
|
|
|
|
fi
|
2002-01-19 06:05:29 -05:00
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/${DISTNAME}/source/script/mksmbpasswd.sh ${PREFIX}/bin/make_smbpasswd
|
2001-09-01 05:10:24 -04:00
|
|
|
|
2002-03-27 11:06:37 -05:00
|
|
|
@${MKDIR} -m 500 ${SAMBA_PRIVATE}
|
2002-01-19 06:05:29 -05:00
|
|
|
@${CHOWN} root:wheel ${SAMBA_PRIVATE}
|
2002-03-27 11:06:37 -05:00
|
|
|
@${CAT} /etc/passwd | ${AWK} -F: '$$6 ~ /home/' | ${PREFIX}/bin/make_smbpasswd > ${SAMBA_PRIVATE}/smbpasswd.sample
|
|
|
|
@test -f ${SAMBA_PRIVATE}/smbpasswd || ${TOUCH} ${SAMBA_PRIVATE}/smbpasswd
|
|
|
|
@${CHMOD} 600 ${SAMBA_PRIVATE}/smbpasswd.sample ${SAMBA_PRIVATE}/smbpasswd
|
2001-09-01 05:10:24 -04:00
|
|
|
|
2002-01-19 06:05:29 -05:00
|
|
|
@${CHOWN} root:wheel ${PREFIX}/bin/smbpasswd
|
|
|
|
@${CHMOD} 111 ${PREFIX}/bin/smbpasswd
|
2000-01-29 00:21:39 -05:00
|
|
|
|
|
|
|
.if !defined(NOPORTDOCS)
|
2002-01-19 06:05:29 -05:00
|
|
|
@${MKDIR} ${PREFIX}/share/doc/samba
|
|
|
|
@${INSTALL_DATA} ${FILESDIR}/README.FreeBSD ${PREFIX}/share/doc/samba
|
|
|
|
@for i in ${WRKDIR}/${DISTNAME}/README \
|
2000-01-29 00:21:39 -05:00
|
|
|
${WRKDIR}/${DISTNAME}/COPYING \
|
|
|
|
${WRKDIR}/${DISTNAME}/Manifest \
|
|
|
|
${WRKDIR}/${DISTNAME}/Read-Manifest-Now \
|
|
|
|
${WRKDIR}/${DISTNAME}/Roadmap \
|
2002-01-19 06:05:29 -05:00
|
|
|
${WRKDIR}/${DISTNAME}/WHATSNEW.txt; do \
|
2000-01-29 00:21:39 -05:00
|
|
|
${INSTALL_DATA} $$i ${PREFIX}/share/doc/samba ; \
|
|
|
|
done
|
2002-01-19 06:05:29 -05:00
|
|
|
@cd ${WRKDIR}/${DISTNAME}/docs; \
|
|
|
|
${TAR} --exclude .cvsignore -cf - . | ${TAR} -xf - -C ${PREFIX}/share/doc/samba
|
|
|
|
@${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/swat/README ${PREFIX}/share/doc/samba/README.swat
|
2000-01-29 00:21:39 -05:00
|
|
|
.endif
|
|
|
|
|
2002-01-19 06:05:29 -05:00
|
|
|
@if [ -f ${VARDIR}/spool/lock/browse.dat ]; then \
|
|
|
|
${RM} -f ${VARDIR}/spool/lock/browse.dat; \
|
|
|
|
fi
|
|
|
|
|
2000-01-29 00:21:39 -05:00
|
|
|
.include <bsd.port.mk>
|