aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2004-11-07 03:49:36 +0800
committerpav <pav@FreeBSD.org>2004-11-07 03:49:36 +0800
commitffb1e74dad48e685806b89cf6620ddf91c57c3ce (patch)
tree9b4be5720ff2a8bccd67265f5c2889d742fb4789 /sysutils
parent41262905733b3992a7779bd14c6a651a4396b330 (diff)
downloadfreebsd-ports-gnome-ffb1e74dad48e685806b89cf6620ddf91c57c3ce.tar.gz
freebsd-ports-gnome-ffb1e74dad48e685806b89cf6620ddf91c57c3ce.tar.zst
freebsd-ports-gnome-ffb1e74dad48e685806b89cf6620ddf91c57c3ce.zip
- Make freebsd-sha1 dependency conditional on OSVERSION
- Remove hardcoded /usr/local PR: ports/73625 Submitted by: cperciva (maintainer)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/portsnap/Makefile21
-rw-r--r--sysutils/portsnap/pkg-message4
2 files changed, 19 insertions, 6 deletions
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.