aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ports-mgmt/portsnap/Makefile21
-rw-r--r--ports-mgmt/portsnap/pkg-message4
-rw-r--r--sysutils/portsnap/Makefile21
-rw-r--r--sysutils/portsnap/pkg-message4
4 files changed, 38 insertions, 12 deletions
diff --git a/ports-mgmt/portsnap/Makefile b/ports-mgmt/portsnap/Makefile
index 6305f269e133..c5ae197f5d26 100644
--- a/ports-mgmt/portsnap/Makefile
+++ b/ports-mgmt/portsnap/Makefile
@@ -7,23 +7,36 @@
PORTNAME= portsnap
PORTVERSION= 0.2
+PORTREVISION= 1
CATEGORIES= sysutils net
MASTER_SITES= http://www.daemonology.net/portsnap/
MAINTAINER= cperciva@daemonology.net
COMMENT= Provides secure snapshots of the ports directory
-# The freebsd-sha1 port is marked IGNORE for some versions of FreeBSD,
-# but for those sha1 should be found in /sbin/, so this should be safe.
RUN_DEPENDS= bspatch:${PORTSDIR}/misc/bsdiff \
- sha1:${PORTSDIR}/sysutils/freebsd-sha1 \
freebsd-update-verify:${PORTSDIR}/security/freebsd-update
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 491101 || (${OSVERSION} > 499999 && ${OSVERSION} < 502114)
+RUN_DEPENDS+= sha1:${PORTSDIR}/sysutils/freebsd-sha1
+.endif
+
MAN5= portsnap.conf.5
MAN8= portsnap.8
PLIST_FILES= etc/portsnap.conf.sample sbin/portsnap
PLIST_DIRS= portsnap
+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}
+
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/portsnap ${PREFIX}/sbin
${INSTALL_MAN} ${WRKSRC}/portsnap.conf.5 ${PREFIX}/man/man5/
@@ -35,4 +48,4 @@ do-install:
post-install:
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/ports-mgmt/portsnap/pkg-message b/ports-mgmt/portsnap/pkg-message
index bdd214bcd8ea..4bd5cc90c830 100644
--- a/ports-mgmt/portsnap/pkg-message
+++ b/ports-mgmt/portsnap/pkg-message
@@ -5,11 +5,11 @@ of the RSA public key which is trusted to sign the snapshots.
A sample configuration file has been installed in
- /usr/local/etc/portsnap.conf.sample
+ %%PREFIX%%/etc/portsnap.conf.sample
which will fetch snapshots built and signed by the author. If you want to
use these updates, copy that file to
- /usr/local/etc/portsnap.conf
+ %%PREFIX%%/etc/portsnap.conf
otherwise, create that file as appropriate.
diff --git a/sysutils/portsnap/Makefile b/sysutils/portsnap/Makefile
index 6305f269e133..c5ae197f5d26 100644
--- a/sysutils/portsnap/Makefile
+++ b/sysutils/portsnap/Makefile
@@ -7,23 +7,36 @@
PORTNAME= portsnap
PORTVERSION= 0.2
+PORTREVISION= 1
CATEGORIES= sysutils net
MASTER_SITES= http://www.daemonology.net/portsnap/
MAINTAINER= cperciva@daemonology.net
COMMENT= Provides secure snapshots of the ports directory
-# The freebsd-sha1 port is marked IGNORE for some versions of FreeBSD,
-# but for those sha1 should be found in /sbin/, so this should be safe.
RUN_DEPENDS= bspatch:${PORTSDIR}/misc/bsdiff \
- sha1:${PORTSDIR}/sysutils/freebsd-sha1 \
freebsd-update-verify:${PORTSDIR}/security/freebsd-update
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 491101 || (${OSVERSION} > 499999 && ${OSVERSION} < 502114)
+RUN_DEPENDS+= sha1:${PORTSDIR}/sysutils/freebsd-sha1
+.endif
+
MAN5= portsnap.conf.5
MAN8= portsnap.8
PLIST_FILES= etc/portsnap.conf.sample sbin/portsnap
PLIST_DIRS= portsnap
+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}
+
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/portsnap ${PREFIX}/sbin
${INSTALL_MAN} ${WRKSRC}/portsnap.conf.5 ${PREFIX}/man/man5/
@@ -35,4 +48,4 @@ do-install:
post-install:
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/sysutils/portsnap/pkg-message b/sysutils/portsnap/pkg-message
index bdd214bcd8ea..4bd5cc90c830 100644
--- a/sysutils/portsnap/pkg-message
+++ b/sysutils/portsnap/pkg-message
@@ -5,11 +5,11 @@ of the RSA public key which is trusted to sign the snapshots.
A sample configuration file has been installed in
- /usr/local/etc/portsnap.conf.sample
+ %%PREFIX%%/etc/portsnap.conf.sample
which will fetch snapshots built and signed by the author. If you want to
use these updates, copy that file to
- /usr/local/etc/portsnap.conf
+ %%PREFIX%%/etc/portsnap.conf
otherwise, create that file as appropriate.