ports/50918: [PATCH] net/wide-dhcp: cosmetique fixes

Sergei Kolobov sergei at kolobov.com
Sun Apr 13 22:30:30 UTC 2003


>Number:         50918
>Category:       ports
>Synopsis:       [PATCH] net/wide-dhcp: cosmetique fixes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 13 15:30:12 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sergei Kolobov
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD elf.chetwood.ru 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sun Apr 13 01:13:44 MSD 2003
>Description:
- Cosmetique fixes:
  - Use DOCSDIR and EXAMPLESDIR in Makefile and pkg-plist
  - Simplify post-install target
  - Check for bpf availabity by calling pkg-req script
  - Reword warning text in pkg-req and remove explicit version reference
  - Correct typo in COMMENT
- Do not update /etc/services - not needed anymore
- Bump PORTREVISION due to changed package
>How-To-Repeat:
>Fix:

--- wide-dhcp-1.4.0.6.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/wide-dhcp/Makefile,v
retrieving revision 1.32
diff -u -r1.32 Makefile
--- Makefile	2003/02/20 18:51:12	1.32
+++ Makefile	2003/04/13 22:16:39
@@ -8,6 +8,7 @@
 
 PORTNAME=	wide-dhcp
 PORTVERSION=	1.4.0.6
+PORTREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	ftp://sh.wide.ad.jp/WIDE/free-ware/dhcp/ \
 		ftp://ftp.netlab.is.tsukuba.ac.jp/pub/network/wide-dhcp/ \
@@ -16,47 +17,23 @@
 DISTNAME=	dhcp-1.4.0p6
 
 MAINTAINER=	ports at FreeBSD.org
-COMMENT=	Dynamic Host Configuration Protocol, WIDE-Implimentation
+COMMENT=	Dynamic Host Configuration Protocol, WIDE Implementation
 
 MAKE_ENV=	OSTYPE=${OPSYS}
 
-MAN5=	dhcpdb.server.5 dhcpdb.pool.5 dhcpdb.relay.5
-MAN8=	dhcpc.8 dhcps.8 relay.8 dhcpm.8
+MAN5=		dhcpdb.server.5 dhcpdb.pool.5 dhcpdb.relay.5
+MAN8=		dhcpc.8 dhcps.8 relay.8 dhcpm.8
+DOCS=		README README.jis db_sample/intro.dhcp db_sample/intro.dhcp.jis
+EXAMPLES=	dhcpdb.pool dhcpdb.relay dhcpdb.server
 
-STARTUP_SCRIPT=	${PREFIX}/etc/rc.d/wide-dhcps.sh.sample
-
 post-install:
+	${INSTALL_SCRIPT} ${FILESDIR}/wide-dhcps.sh.sample ${PREFIX}/etc/rc.d
+	@${MKDIR} ${EXAMPLESDIR}
+	@cd ${WRKSRC}/db_sample && ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR}
 .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; \
-	fi
-	@${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/
+	@${MKDIR} ${DOCSDIR}
+	@cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
 .endif
-	@if [ ! -f ${STARTUP_SCRIPT} ]; then				    \
-		${ECHO} "Installing ${STARTUP_SCRIPT} startup file.";	    \
-		${INSTALL_SCRIPT} ${FILESDIR}/wide-dhcps.sh.sample ${STARTUP_SCRIPT}; \
-	fi
-	@if [ ! -c /dev/bpf1 ]; then \
-	    ${ECHO} "********************************************************";\
-	    ${ECHO} "*                   W a r n i n g                      *";\
-	    ${ECHO} "* DHCP the needs Berkeley Packet Filter (bpf).         *";\
-	    ${ECHO} "* To use DHCP, your kernel must be rebuilt with bpf,   *";\
-	    ${ECHO} "* and make bpf devices on /dev directory.              *";\
-	    ${ECHO} "* Please read the info file by \`pkg_info ${PKGNAME}'. *";\
-	    ${ECHO} "********************************************************";\
-	fi
+	${.CURDIR}/pkg-req ${PKGNAME} INSTALL
 
 .include <bsd.port.mk>
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/net/wide-dhcp/pkg-plist,v
retrieving revision 1.8
diff -u -r1.8 pkg-plist
--- pkg-plist	2000/11/22 02:22:49	1.8
+++ pkg-plist	2003/04/13 22:16:39
@@ -1,20 +1,16 @@
 @comment $FreeBSD: ports/net/wide-dhcp/pkg-plist,v 1.8 2000/11/22 02:22:49 obrien Exp $
+etc/rc.d/wide-dhcps.sh.sample
 sbin/dhcpc
 sbin/dhcpm
 sbin/relay
 sbin/dhcps
-share/doc/dhcp/README
-share/doc/dhcp/README.jis
-share/doc/dhcp/intro.dhcp
-share/doc/dhcp/intro.dhcp.jis
-share/examples/dhcp/dhcpdb.pool.sample
-share/examples/dhcp/dhcpdb.relay.sample
-share/examples/dhcp/dhcpdb.server.sample
-etc/rc.d/wide-dhcps.sh.sample
- at exec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcps /etc/services.bak ; echo "dhcps		67/udp    # dhcp server") > /etc/services
- at unexec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcps /etc/services.bak ) > /etc/services
- at exec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcpc /etc/services.bak ; echo "dhcpc		68/udp    # dhcp client") > /etc/services
- at unexec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcpc /etc/services.bak ) > /etc/services
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.jis
+%%PORTDOCS%%%%DOCSDIR%%/intro.dhcp
+%%PORTDOCS%%%%DOCSDIR%%/intro.dhcp.jis
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%EXAMPLESDIR%%/dhcpdb.pool
+%%EXAMPLESDIR%%/dhcpdb.relay
+%%EXAMPLESDIR%%/dhcpdb.server
+ at dirrm %%EXAMPLESDIR%%
 @unexec rm -f /var/db/dhcp_cache
- at dirrm share/doc/dhcp
- at dirrm share/examples/dhcp
Index: pkg-req
===================================================================
RCS file: /home/ncvs/ports/net/wide-dhcp/pkg-req,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 pkg-req
--- pkg-req	1996/05/04 02:43:33	1.1.1.1
+++ pkg-req	2003/04/13 22:16:39
@@ -2,12 +2,10 @@
 if [ "$2" != "INSTALL" ]; then
   exit 0
 fi
-if [ ! -c /dev/bpf1 ]; then \
-	echo "**********************************************************";\
-	echo "*                      W a r n i n g                     *";\
-	echo "* This DHCP program need 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 dhcp-1.3b'.  *";\
-	echo "**********************************************************";\
+if [ ! -c /dev/bpf1 ]; then
+	echo "**********************************************************"
+	echo "* This DHCP program need Berkeley packet filter (bpf)"
+	echo "* To use DHCP, you need to rebuild your kernel with bpf"
+	echo "* and make bpf devices in the /dev directory."
+	echo "**********************************************************"
 fi
--- wide-dhcp-1.4.0.6.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list