Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jan 2014 01:24:29 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r338733 - head/benchmarks/nuttcp
Message-ID:  <201401050124.s051OTDL005992@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sun Jan  5 01:24:29 2014
New Revision: 338733
URL: http://svnweb.freebsd.org/changeset/ports/338733

Log:
  Support stage
  Use options helpers
  Use shebangfix

Modified:
  head/benchmarks/nuttcp/Makefile
  head/benchmarks/nuttcp/pkg-plist

Modified: head/benchmarks/nuttcp/Makefile
==============================================================================
--- head/benchmarks/nuttcp/Makefile	Sun Jan  5 01:22:56 2014	(r338732)
+++ head/benchmarks/nuttcp/Makefile	Sun Jan  5 01:24:29 2014	(r338733)
@@ -13,10 +13,11 @@ EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 MAINTAINER=	andrewclarkii@gmail.com
 COMMENT=	TCP/UDP network testing tool
 
+USES=		shebangfix
+SHEBANG_FILES=	../nuttscp
 USE_BZIP2=	yes
 MAKEFILE=	/dev/null
 ALL_TARGET=	${PORTNAME}
-MAN8=		${PORTNAME}.8
 
 NUTTSCPVERSION=	1.7
 NUTTSCPDISTFILE=nuttscp-${NUTTSCPVERSION}
@@ -25,45 +26,36 @@ OPTIONS_DEFINE=	NUTTSCP
 OPTIONS_DEFAULT=	NUTTSCP
 
 NUTTSCP_DESC=	Install script for copying files over nuttcp
+OPTIONS_SUB=	yes
+NUTTSCP_USES=	perl5
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MNUTTSCP}
-USES+=		perl5
-PLIST_SUB+=	NUTTSCP=""
-.else
-PLIST_SUB+=	NUTTSCP="@comment "
-.endif
+post-extract:
+	@${CP} ${DISTDIR}/${DIST_SUBDIR}/${NUTTSCPDISTFILE} ${WRKDIR}/nuttscp
 
-.include <bsd.port.pre.mk>
-
-post-extract:	.SILENT
-	${CP} ${DISTDIR}/${DIST_SUBDIR}/${NUTTSCPDISTFILE} ${WRKDIR}/nuttscp
-
-post-patch:	.SILENT
+post-patch:
 	${FIND} ${WRKSRC}/ -type f -exec \
 		${REINPLACE_CMD} 's|/usr/local|${PREFIX}|g' {} +
-	${REINPLACE_CMD} 's|/usr/bin/perl|${PERL}|g' ${WRKDIR}/nuttscp
 
 do-install:
 .	if ${PORT_OPTIONS:MNUTTSCP}
-		${INSTALL_SCRIPT} ${WRKDIR}/nuttscp ${PREFIX}/bin/
-		( cd ${PREFIX}/bin; ${LN} -sf nuttscp nuttrcp )
+		${INSTALL_SCRIPT} ${WRKDIR}/nuttscp ${STAGEDIR}${PREFIX}/bin/
+		( cd ${STAGEDIR}${PREFIX}/bin; ${LN} -sf nuttscp nuttrcp )
 .	endif
 
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
-	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${MAN8PREFIX}/man/man8/
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
+	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/
 
-	${MKDIR} ${DATADIR}/
+	${MKDIR} ${STAGEDIR}${DATADIR}/
 .	for file in LICENSE README examples.txt
-		${INSTALL_DATA} ${WRKSRC}/${file} ${DATADIR}/
+		${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DATADIR}/
 .	endfor
 
-	${MKDIR} ${PREFIX}/etc/xinetd.d/
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc/xinetd.d/
 .	for file in ${PORTNAME} ${PORTNAME}4 ${PORTNAME}6
 		${INSTALL_DATA} ${WRKSRC}/xinetd.d/${file} \
-			${PREFIX}/etc/xinetd.d/
+			${STAGEDIR}${PREFIX}/etc/xinetd.d/
 .	endfor
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/benchmarks/nuttcp/pkg-plist
==============================================================================
--- head/benchmarks/nuttcp/pkg-plist	Sun Jan  5 01:22:56 2014	(r338732)
+++ head/benchmarks/nuttcp/pkg-plist	Sun Jan  5 01:24:29 2014	(r338733)
@@ -7,5 +7,6 @@ bin/nuttcp
 etc/xinetd.d/nuttcp
 etc/xinetd.d/nuttcp4
 etc/xinetd.d/nuttcp6
+man/man8/nuttcp.8.gz
 @dirrm %%DATADIR%%
 @dirrmtry etc/xinetd.d



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401050124.s051OTDL005992>