2000-01-29 05:21:39 +00:00
|
|
|
# New ports collection makefile for: samba
|
|
|
|
# Date created: 27 Dec 1999
|
|
|
|
# Whom: Shinya Sasaki <pcmaster@osk3.3web.ne.jp>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2000-04-12 14:38:12 +00:00
|
|
|
PORTNAME= samba
|
2000-08-30 04:47:06 +00:00
|
|
|
PORTVERSION= ${SAMBA_VERSION}.j${SAMBA_JA_VERSION}
|
2000-01-29 05:21:39 +00:00
|
|
|
CATEGORIES= japanese net
|
2000-08-29 19:47:14 +00:00
|
|
|
MASTER_SITES= ftp://ftp.samba.gr.jp/pub/samba-jp/%SUBDIR%/ \
|
|
|
|
ftp://ftp.iij.ad.jp/pub/SAMBA/samba-jp/%SUBDIR%/ \
|
|
|
|
ftp://SunSITE.sut.ac.jp/pub/archives/packages/samba/samba-jp/%SUBDIR%/ \
|
|
|
|
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 04:47:06 +00:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}-${SAMBA_VERSION}-ja
|
|
|
|
DISTNAME= ${PORTNAME}-${SAMBA_VERSION}-ja-${SAMBA_JA_VERSION}
|
2000-01-29 05:21:39 +00:00
|
|
|
|
2000-08-29 19:47:14 +00:00
|
|
|
MAINTAINER= nakaji@jp.FreeBSD.org
|
|
|
|
|
|
|
|
BUILD_DEPENDS= msgfmt:${PORTSDIR}/devel/gettext
|
2000-01-29 05:21:39 +00:00
|
|
|
|
|
|
|
Y2K= http://us1.samba.org/samba/docs/sambay2k.html
|
|
|
|
|
2000-08-30 04:47:06 +00:00
|
|
|
SAMBA_VERSION= 2.0.7
|
2000-09-25 07:34:31 +00:00
|
|
|
SAMBA_JA_VERSION= 1.3
|
2000-04-12 14:38:12 +00:00
|
|
|
|
2000-01-29 05:21:39 +00: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
|
|
|
|
|
|
|
|
GNU_CONFIGURE= yes
|
2000-08-29 19:47:14 +00:00
|
|
|
USE_AUTOCONF= yes
|
|
|
|
CONFIGURE_ARGS= --with-i18n-swat --with-included-gettext \
|
|
|
|
--libdir=${SAMBA_CONFDIR} \
|
2000-01-29 05:21:39 +00:00
|
|
|
--localstatedir=${VARDIR} --with-swatdir=${PREFIX}/share/swat \
|
2000-08-29 19:47:14 +00:00
|
|
|
--with-sambabook=${PREFIX}/share/swat/using_samba \
|
|
|
|
--with-lockdir=${VARDIR}/spool/lock \
|
|
|
|
--with-privatedir=${SAMBA_PRIVATE} \
|
|
|
|
--with-swat-langfile=${PREFIX}/share/swat-i18n.txt
|
2000-01-29 05:21:39 +00:00
|
|
|
|
|
|
|
.if defined(KRB5_HOME) && exists(${KRB5_HOME})
|
|
|
|
CONFIGURE_ARGS+=--with-krb5=${KRB5_HOME}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}/source
|
|
|
|
|
|
|
|
MAN1= nmblookup.1 smbstatus.1 smbclient.1 smbrun.1 smbtar.1 \
|
2000-08-29 19:47:14 +00:00
|
|
|
testparm.1 testprns.1 make_smbcodepage.1 smbsh.1 \
|
|
|
|
make_unicodemap.1
|
2000-01-29 05:21:39 +00:00
|
|
|
MAN5= smb.conf.5 smbpasswd.5 lmhosts.5
|
|
|
|
MAN7= samba.7
|
2000-08-29 19:47:14 +00:00
|
|
|
MAN8= smbd.8 nmbd.8 smbpasswd.8 swat.8 smbspool.8
|
|
|
|
MANLANG= "" ja
|
2000-01-29 05:21:39 +00:00
|
|
|
|
2000-08-29 19:47:14 +00:00
|
|
|
pre-install:
|
|
|
|
${RM} -f ${WRKDIR}/${DISTNAME}/docs/manpages/smbmnt.8
|
|
|
|
${RM} -f ${WRKDIR}/${DISTNAME}/docs/manpages/smbmount.8
|
|
|
|
${RM} -f ${WRKDIR}/${DISTNAME}/docs/manpages/smbumount.8
|
|
|
|
${RM} -f ${WRKDIR}/${DISTNAME}/docs/ja/manpages/smbmnt.8.man
|
|
|
|
${RM} -f ${WRKDIR}/${DISTNAME}/docs/ja/manpages/smbmount.8.man
|
|
|
|
${RM} -f ${WRKDIR}/${DISTNAME}/docs/ja/manpages/smbumount.8.man
|
2000-02-12 23:23:48 +00:00
|
|
|
|
2000-01-29 05:21:39 +00:00
|
|
|
post-install:
|
|
|
|
${MKDIR} ${PREFIX}/share/examples/samba
|
|
|
|
${CP} -rp ${WRKDIR}/${DISTNAME}/examples/* ${PREFIX}/share/examples/samba
|
|
|
|
@if [ ! -f ${STARTUP_SCRIPT} ]; then \
|
|
|
|
${ECHO} "Installing ${STARTUP_SCRIPT} startup file." ; \
|
|
|
|
${INSTALL_SCRIPT} ${FILESDIR}/samba.sh.sample \
|
|
|
|
${STARTUP_SCRIPT} ; \
|
|
|
|
fi
|
|
|
|
@test -d ${SAMBA_SPOOL} || ${MKDIR} ${SAMBA_SPOOL} && ${CHMOD} 1777 ${SAMBA_SPOOL}
|
|
|
|
@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
|
|
|
|
${INSTALL_SCRIPT} ${WRKDIR}/${DISTNAME}/source/script/mksmbpasswd.sh ${PREFIX}/bin/make_smbpasswd
|
|
|
|
if [ ! -d ${SAMBA_PRIVATE} ] ; then \
|
|
|
|
${MKDIR} ${SAMBA_PRIVATE} ; \
|
|
|
|
${CHOWN} root.wheel ${SAMBA_PRIVATE} ; \
|
|
|
|
fi
|
|
|
|
${CHMOD} 700 ${SAMBA_PRIVATE}
|
|
|
|
if [ ! -f ${SAMBA_PRIVATE}/smbpasswd ] ; then \
|
|
|
|
${CAT} /etc/passwd | ${PREFIX}/bin/make_smbpasswd > ${SAMBA_PRIVATE}/smbpasswd ; \
|
|
|
|
${CHMOD} 600 ${SAMBA_PRIVATE}/smbpasswd ; \
|
|
|
|
fi
|
|
|
|
${CHMOD} 500 ${SAMBA_PRIVATE}
|
|
|
|
${CHOWN} root.wheel ${PREFIX}/bin/smbpasswd
|
|
|
|
${CHMOD} 111 ${PREFIX}/bin/smbpasswd
|
2000-08-29 19:47:14 +00:00
|
|
|
.if defined(PACKAGE_BUILDING)
|
|
|
|
${ECHO} "private/smbpasswd" >> ${TMPPLIST}
|
|
|
|
${ECHO} "@dirrm private" >> ${TMPPLIST}
|
|
|
|
.else
|
|
|
|
${ECHO} "@unexec echo \"Warning: If you will *NOT* use this package anymore, please remove %D/private/smbpasswd manually.\"" >> ${TMPPLIST}
|
|
|
|
.endif
|
2000-01-29 05:21:39 +00:00
|
|
|
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${PREFIX}/share/doc/samba
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/README.FreeBSD ${PREFIX}/share/doc/samba
|
|
|
|
for i in ${WRKDIR}/${DISTNAME}/README \
|
|
|
|
${WRKDIR}/${DISTNAME}/COPYING \
|
|
|
|
${WRKDIR}/${DISTNAME}/Manifest \
|
|
|
|
${WRKDIR}/${DISTNAME}/Read-Manifest-Now \
|
|
|
|
${WRKDIR}/${DISTNAME}/Roadmap \
|
|
|
|
${WRKDIR}/${DISTNAME}/WHATSNEW.txt \
|
2000-08-29 19:47:14 +00:00
|
|
|
${WRKDIR}/${DISTNAME}/docs/*.reg \
|
2000-01-29 05:21:39 +00:00
|
|
|
${WRKDIR}/${DISTNAME}/docs/THANKS \
|
|
|
|
${WRKDIR}/${DISTNAME}/docs/announce \
|
|
|
|
${WRKDIR}/${DISTNAME}/docs/history ; do \
|
|
|
|
${INSTALL_DATA} $$i ${PREFIX}/share/doc/samba ; \
|
|
|
|
done
|
2000-08-29 19:47:14 +00:00
|
|
|
for i in faq htmldocs textdocs yodldocs ; do \
|
2000-01-29 05:21:39 +00:00
|
|
|
${MKDIR} ${PREFIX}/share/doc/samba/$$i ; \
|
|
|
|
for j in ${WRKDIR}/${DISTNAME}/docs/$$i/* ; do \
|
2000-08-29 19:47:14 +00:00
|
|
|
if [ $$j != ${WRKDIR}/${DISTNAME}/docs/htmldocs/using_samba ] ; then \
|
|
|
|
${INSTALL_DATA} $$j ${PREFIX}/share/doc/samba/$$i ;\
|
|
|
|
fi; \
|
2000-01-29 05:21:39 +00:00
|
|
|
done \
|
|
|
|
done
|
|
|
|
${MKDIR} ${PREFIX}/share/doc/samba
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/swat/README ${PREFIX}/share/doc/samba/README.swat
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|