diff --git a/benchmarks/netperf/Makefile b/benchmarks/netperf/Makefile index 889e863f4c89..f31523942eae 100644 --- a/benchmarks/netperf/Makefile +++ b/benchmarks/netperf/Makefile @@ -15,16 +15,24 @@ MAINTAINER= fenner@freebsd.org MAKEFILE= makefile MAN1= netperf.1 netserver.1 -MINSTALL= ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} + +SCRIPTS= arr_script snapshot_script tcp_range_script tcp_rr_script \ + tcp_stream_script udp_rr_script udp_stream_script + +post-patch: +.for i in ${SCRIPTS} + @${MV} ${WRKSRC}/$i ${WRKSRC}/$i.pre-sed + @${SED} -e 's^%%PREFIX%%^${PREFIX}^' ${WRKSRC}/$i.pre-sed > ${WRKSRC}/$i +.endfor post-install: strip ${PREFIX}/netperf/netperf strip ${PREFIX}/netperf/netserver - ${MINSTALL} ${WRKSRC}/netperf.man ${PREFIX}/man/man1/netperf.1 - ${MINSTALL} ${WRKSRC}/netserver.man ${PREFIX}/man/man1/netserver.1 + ${INSTALL_MAN} ${WRKSRC}/netperf.man ${PREFIX}/man/man1/netperf.1 + ${INSTALL_MAN} ${WRKSRC}/netserver.man ${PREFIX}/man/man1/netserver.1 .if !defined(NOPORTDOCS) ${MKDIR} ${PREFIX}/share/doc/netperf - ${MINSTALL} ${WRKSRC}/netperf.ps ${PREFIX}/share/doc/netperf + ${INSTALL_DATA} ${WRKSRC}/netperf.ps ${PREFIX}/share/doc/netperf ${GZIP_CMD} ${PREFIX}/share/doc/netperf/netperf.ps .endif diff --git a/benchmarks/netperf/files/patch-aa b/benchmarks/netperf/files/patch-aa index 667061b52de5..d3161d61ebb6 100644 --- a/benchmarks/netperf/files/patch-aa +++ b/benchmarks/netperf/files/patch-aa @@ -14,7 +14,7 @@ # for the rest of the world, it is probably better to put the binaries # in /usr/local/netperf or /opt/netperf # -! NETPERF_HOME = /usr/local/netperf +! NETPERF_HOME = ${PREFIX}/netperf ! #NETPERF_HOME = /opt/netperf # The compiler on your system might be somewhere else, and/or have @@ -32,7 +32,7 @@ # -U__hpux - Use this when compiling _on_ HP-UX *for* an HP-RT system LOG_FILE=DEBUG_LOG_FILE="\"/tmp/netperf.debug\"" -! CFLAGS = %CFLAGS% -D$(LOG_FILE) -DUSE_LOOPER -DHISTOGRAM -DDO_UNIX +! CFLAGS = %CFLAGS% -D$(LOG_FILE) -DUSE_LOOPER -DHISTOGRAM -DDO_UNIX -DDO_1644 # Some platforms, and some options, require additional libraries. # you can add to the "LIBS =" line to accomplish this. if you find @@ -207,7 +207,7 @@ # # where is netperf installed, there are a few possible places: -! NETPERF_CMD=${NETPERF_CMD:=/usr/local/netperf/netperf} +! NETPERF_CMD=${NETPERF_CMD:=%%PREFIX%%/netperf/netperf} # there should be no more than two parms passed @@ -226,7 +226,7 @@ # where is netperf, and are there any "constant" options such as # the netserver port number #NETHOME=/usr/etc/net_perf -! NETHOME="/usr/local/netperf" +! NETHOME="%%PREFIX%%/netperf" NETPERF=$NETHOME/netperf $PORT # How accurate we want the estimate of performance: @@ -247,7 +247,7 @@ fi # where the programs are -! NETHOME=/usr/local/netperf +! NETHOME=%%PREFIX%%/netperf #NETHOME="/opt/netperf" ! #NETHOME=. @@ -270,7 +270,7 @@ fi # where the programs are -! NETHOME=/usr/local/netperf +! NETHOME=%%PREFIX%%/netperf #NETHOME="/opt/netperf" ! #NETHOME=. @@ -293,7 +293,7 @@ # where the programs are -! NETHOME=/usr/local/netperf +! NETHOME=%%PREFIX%%/netperf #NETHOME="/opt/netperf" ! #NETHOME="." @@ -316,7 +316,7 @@ # where the programs are -! NETHOME=/usr/local/netperf +! NETHOME=%%PREFIX%%/netperf #NETHOME="/opt/netperf" ! #NETHOME="."