aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/portsnap
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2006-07-20 09:15:03 +0800
committeredwin <edwin@FreeBSD.org>2006-07-20 09:15:03 +0800
commit40591fa770c345985e9072724eb2866dea49aaa4 (patch)
tree234545af7e3c9290166a96d87e7d4631975c8060 /sysutils/portsnap
parent3ac218bd0e14fad44f36ae7655750aa0dc5a951d (diff)
downloadfreebsd-ports-gnome-40591fa770c345985e9072724eb2866dea49aaa4.tar.gz
freebsd-ports-gnome-40591fa770c345985e9072724eb2866dea49aaa4.tar.zst
freebsd-ports-gnome-40591fa770c345985e9072724eb2866dea49aaa4.zip
sysutils/portsnap - cleanup
- move pkg-message to files/pkg-message.in and use SUB_FILES - move post-extract to post-patch and use REINPLACE_CMD - replace ${PREFIX} in man-page with %%PREFIX%% and then REINPLACE_CMD over it. - Make replacement in former post-extract actually work due to changed layout of the file. PR: ports/100584 Submitted by: Edwin Groothuis <edwin@mavetju.org> Approved by: cperciva@#bsdports
Diffstat (limited to 'sysutils/portsnap')
-rw-r--r--sysutils/portsnap/Makefile11
-rw-r--r--sysutils/portsnap/files/patch-portsnap11
-rw-r--r--sysutils/portsnap/files/patch-portsnap.841
-rw-r--r--sysutils/portsnap/files/pkg-message.in (renamed from sysutils/portsnap/pkg-message)0
4 files changed, 56 insertions, 7 deletions
diff --git a/sysutils/portsnap/Makefile b/sysutils/portsnap/Makefile
index ccd6fada6223..dacdc016369c 100644
--- a/sysutils/portsnap/Makefile
+++ b/sysutils/portsnap/Makefile
@@ -31,15 +31,12 @@ PLIST_FILES= etc/portsnap.conf.sample sbin/portsnap \
libexec/phttpget \
libexec/make_index portsnap/.package.this.directory
PLIST_DIRS= portsnap
-
+SUB_FILES= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
-post-extract:
- ${SED} -e "s#PREFIX=/usr/local#PREFIX=${PREFIX}#g" \
- ${WRKSRC}/portsnap > ${WRKSRC}/portsnap.new
- ${MV} ${WRKSRC}/portsnap.new ${WRKSRC}/portsnap
- @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${PKGDIR}/pkg-message \
- > ${PKGMESSAGE}
+post-patch:
+ ${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" \
+ ${WRKSRC}/portsnap ${WRKSRC}/portsnap.8
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/portsnap ${PREFIX}/sbin
diff --git a/sysutils/portsnap/files/patch-portsnap b/sysutils/portsnap/files/patch-portsnap
new file mode 100644
index 000000000000..a2caace08db9
--- /dev/null
+++ b/sysutils/portsnap/files/patch-portsnap
@@ -0,0 +1,11 @@
+--- portsnap.orig Thu Jul 20 09:00:57 2006
++++ portsnap Thu Jul 20 09:01:14 2006
+@@ -81,7 +81,7 @@
+ NDEBUG=""
+ DDSTATS=""
+ INDEXONLY=""
+- PREFIX="/usr/local"
++ PREFIX="%%PREFIX%%"
+ SERVERNAME=""
+ REFUSE=""
+ LOCALDESC=""
diff --git a/sysutils/portsnap/files/patch-portsnap.8 b/sysutils/portsnap/files/patch-portsnap.8
new file mode 100644
index 000000000000..1a48185d48d7
--- /dev/null
+++ b/sysutils/portsnap/files/patch-portsnap.8
@@ -0,0 +1,41 @@
+--- portsnap.8.orig Sat May 27 09:21:29 2006
++++ portsnap.8 Thu Jul 20 09:06:29 2006
+@@ -57,13 +57,13 @@
+ Store working files (e.g. downloaded updates) in
+ .Ar workdir .
+ (default:
+-.Pa $PREFIX/portsnap ,
++.Pa %%PREFIX%%/portsnap ,
+ or as given in the configuration file.)
+ .It Fl f Ar conffile
+ Read the configuration from from
+ .Ar conffile .
+ (default:
+-.Pa $PREFIX/etc/portsnap.conf )
++.Pa %%PREFIX%%/etc/portsnap.conf )
+ .It Fl I
+ For the
+ .Cm update
+@@ -157,7 +157,7 @@
+ .It
+ If your clock is set to local time, adding the line
+ .Pp
+-.Dl 0 3 * * * root /usr/local/sbin/portsnap cron
++.Dl 0 3 * * * root /foo/sbin/portsnap cron
+ .Pp
+ to /etc/crontab is a good way to make sure you always have
+ an up-to-date snapshot of the ports tree available which
+@@ -218,10 +218,10 @@
+ may be published, but only in aggregate and after anonymizing the
+ individual systems.
+ .Sh FILES
+-.Bl -tag -width "$PREFIX/etc/portsnap.conf"
+-.It $PREFIX/etc/portsnap.conf
++.Bl -tag -width "%%PREFIX%%/etc/portsnap.conf"
++.It %%PREFIX%%/etc/portsnap.conf
+ Default location of the portsnap configuration file.
+-.It $PREFIX/portsnap
++.It %%PREFIX%%/portsnap
+ Default location where compressed snapshots are stored.
+ .It /usr/ports
+ Default location where the ports tree is extracted.
diff --git a/sysutils/portsnap/pkg-message b/sysutils/portsnap/files/pkg-message.in
index 519591ac4336..519591ac4336 100644
--- a/sysutils/portsnap/pkg-message
+++ b/sysutils/portsnap/files/pkg-message.in