summaryrefslogtreecommitdiff
path: root/ports-mgmt
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-11-06 19:49:36 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-11-06 19:49:36 +0000
commit4197d228a49dbde7417bed338b36cfae0f9871fd (patch)
tree04efe294b893c7271c618a10e776060f59051262 /ports-mgmt
parentUpdate -devel to Python-2.4b2. (diff)
- Make freebsd-sha1 dependency conditional on OSVERSION
- Remove hardcoded /usr/local PR: ports/73625 Submitted by: cperciva (maintainer)
Notes
Notes: svn path=/head/; revision=120988
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/portsnap/Makefile21
-rw-r--r--ports-mgmt/portsnap/pkg-message4
2 files changed, 19 insertions, 6 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.