1996-05-03 22:43:35 -04:00
|
|
|
# New ports collection makefile for: dhcp
|
1998-05-02 11:15:28 -04:00
|
|
|
# Version required: 1.4.0p1
|
1996-05-03 22:43:35 -04:00
|
|
|
# Date created: 21 November 1995
|
|
|
|
# Whom: Yoshiro MIHIRA <sanpei@yy.cs.keio.ac.jp>
|
|
|
|
#
|
1998-08-10 05:07:55 -04:00
|
|
|
# $Id: Makefile,v 1.12 1998/05/02 15:14:30 max Exp $
|
1996-05-03 22:43:35 -04:00
|
|
|
#
|
|
|
|
|
1998-05-02 11:15:28 -04:00
|
|
|
DISTNAME= dhcp-1.4.0p1
|
|
|
|
PKGNAME= wide-dhcp-1.4.0p1
|
1996-11-18 06:44:27 -05:00
|
|
|
CATEGORIES= net
|
1998-05-02 11:15:28 -04:00
|
|
|
MASTER_SITES= ftp://sh.wide.ad.jp/WIDE/free-ware/dhcp/
|
1996-05-03 22:43:35 -04:00
|
|
|
|
1998-05-02 11:15:28 -04:00
|
|
|
MAINTAINER= hideyuki@sat.t.u-tokyo.ac.jp
|
1996-05-03 22:43:35 -04:00
|
|
|
|
1998-08-10 05:07:55 -04:00
|
|
|
MAKE_ENV= OSTYPE=${OPSYS}
|
1996-05-20 04:06:55 -04:00
|
|
|
|
1997-05-30 14:52:45 -04:00
|
|
|
MAN5= dhcpdb.server.5 dhcpdb.pool.5 dhcpdb.relay.5
|
|
|
|
MAN8= dhcpc.8 dhcps.8 relay.8 dhcpm.8
|
|
|
|
|
1997-04-03 21:20:28 -05:00
|
|
|
STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/wide-dhcps.sh.sample
|
|
|
|
|
1996-05-03 22:43:35 -04:00
|
|
|
post-install:
|
1997-05-30 14:52:45 -04:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@if [ ! -d ${PREFIX}/share/doc/dhcp ]; then \
|
|
|
|
${MKDIR} ${PREFIX}/share/doc/dhcp; \
|
|
|
|
fi
|
|
|
|
@if [ ! -d ${PREFIX}/share/examples/dhcp ]; then \
|
|
|
|
${MKDIR} ${PREFIX}/share/examples/dhcp; \
|
1996-05-03 22:43:35 -04:00
|
|
|
fi
|
1997-05-30 14:52:45 -04:00
|
|
|
@${CP} ${WRKSRC}/README ${PREFIX}/share/doc/dhcp/
|
|
|
|
@${CP} ${WRKSRC}/README.jis ${PREFIX}/share/doc/dhcp/
|
|
|
|
@${CP} ${WRKSRC}/db_sample/dhcpdb.pool ${PREFIX}/share/examples/dhcp/dhcpdb.pool.sample
|
|
|
|
@${CP} ${WRKSRC}/db_sample/dhcpdb.relay ${PREFIX}/share/examples/dhcp/dhcpdb.relay.sample
|
|
|
|
@${CP} ${WRKSRC}/db_sample/dhcpdb.server ${PREFIX}/share/examples/dhcp/dhcpdb.server.sample
|
|
|
|
@${CP} ${WRKSRC}/db_sample/intro.dhcp ${PREFIX}/share/doc/dhcp/
|
|
|
|
@${CP} ${WRKSRC}/db_sample/intro.dhcp.jis ${PREFIX}/share/doc/dhcp/
|
|
|
|
.endif
|
1997-04-03 21:20:28 -05:00
|
|
|
@if [ ! -f ${STARTUP_SCRIPT} ]; then \
|
|
|
|
echo "Installing ${STARTUP_SCRIPT} startup file."; \
|
|
|
|
echo '#!/bin/sh' > ${STARTUP_SCRIPT}; \
|
1997-05-30 14:38:11 -04:00
|
|
|
echo 'DB_POOL=/etc/dhcpdb.pool' >> ${STARTUP_SCRIPT}; \
|
|
|
|
echo 'DB_RELAY=/etc/dhcpdb.relay' >> ${STARTUP_SCRIPT}; \
|
|
|
|
echo 'DB_BIND=/var/db/dhcpdb.bind' >> ${STARTUP_SCRIPT};\
|
|
|
|
echo 'if [ -f $${DB_POOL} -a -f $${DB_RELAY} \'\
|
1997-04-03 21:20:28 -05:00
|
|
|
>> ${STARTUP_SCRIPT}; \
|
|
|
|
echo ' -a -x /usr/local/sbin/dhcps ]; then' \
|
|
|
|
>> ${STARTUP_SCRIPT}; \
|
1997-05-30 14:38:11 -04:00
|
|
|
echo ' if [ -f $${DB_BIND} ]; then' >> ${STARTUP_SCRIPT};\
|
|
|
|
echo ' find $${DB_POOL} -newer $${DB_BIND} -exec rm $${DB_BIND} \;'\
|
|
|
|
>> ${STARTUP_SCRIPT}; \
|
|
|
|
echo ' fi' >> ${STARTUP_SCRIPT}; \
|
1998-04-18 08:40:04 -04:00
|
|
|
echo " ${PREFIX}/sbin/dhcps [Interface Name]" \
|
1997-04-03 21:20:28 -05:00
|
|
|
>> ${STARTUP_SCRIPT}; \
|
|
|
|
echo " echo -n ' dhcps'" \
|
|
|
|
>> ${STARTUP_SCRIPT}; \
|
|
|
|
echo 'fi' >> ${STARTUP_SCRIPT}; \
|
|
|
|
chmod 755 ${STARTUP_SCRIPT}; \
|
|
|
|
chown bin.bin ${STARTUP_SCRIPT}; \
|
|
|
|
fi
|
1996-05-03 22:43:35 -04:00
|
|
|
@if [ ! -c /dev/bpf1 ]; then \
|
|
|
|
echo "**********************************************************";\
|
|
|
|
echo "* W a r n i n g *";\
|
|
|
|
echo "* This DHCP program needs Berkeley packet filter (bpf). *";\
|
|
|
|
echo "* To use DHCP, your kernel must be rebuilt with bpf, and *";\
|
|
|
|
echo "* make bpf devices on /dev directory. *";\
|
|
|
|
echo "* Please read some info file with \`pkg_info ${PKGNAME}'. *";\
|
|
|
|
echo "**********************************************************";\
|
|
|
|
fi
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|