aboutsummaryrefslogtreecommitdiff
path: root/devel/pmk
diff options
context:
space:
mode:
authorSean Chittenden <seanc@FreeBSD.org>2004-11-30 07:56:10 +0000
committerSean Chittenden <seanc@FreeBSD.org>2004-11-30 07:56:10 +0000
commit2d0db4595dd94b0582f23bc055bb7d36b76ee032 (patch)
tree19dd5eae61b84ef1506f6c798f19079389a8fda0 /devel/pmk
parent5f0fb603ff783d9f11a6bb6da8d4042f55c526fd (diff)
downloadports-2d0db4595dd94b0582f23bc055bb7d36b76ee032.tar.gz
ports-2d0db4595dd94b0582f23bc055bb7d36b76ee032.zip
Notes
Diffstat (limited to 'devel/pmk')
-rw-r--r--devel/pmk/Makefile12
-rw-r--r--devel/pmk/pkg-install16
-rw-r--r--devel/pmk/pkg-plist3
3 files changed, 31 insertions, 0 deletions
diff --git a/devel/pmk/Makefile b/devel/pmk/Makefile
index 9bdaceae19af..0f73c22387d1 100644
--- a/devel/pmk/Makefile
+++ b/devel/pmk/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pmk
PORTVERSION= 0.8.1
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= pmk
@@ -14,6 +15,8 @@ MASTER_SITE_SUBDIR= pmk
MAINTAINER= seanc@FreeBSD.org
COMMENT= Pre Make Kit, a sane replacement for autoconf
+PKGINSTALL= ${WRKDIR}/pkg-install
+
MAN1= pmk.1 pmkscan.1 pmkinstall.1
MAN5= pmk.conf.5 pmkfile.5
MAN8= pmksetup.8
@@ -21,4 +24,13 @@ MAN8= pmksetup.8
do-configure:
cd ${WRKSRC}; SYSCONFDIR=${PREFIX}/etc ./pmkcfg.sh
+post-build:
+ @${CAT} ${PKGDIR}/pkg-install | ${SED} -e 's,%%PREFIX%%,${PREFIX},g' > ${PKGINSTALL}
+
+post-install:
+ @${TRUE}
+.if !defined(PACKAGE_BUILDING)
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.endif
+
.include <bsd.port.mk>
diff --git a/devel/pmk/pkg-install b/devel/pmk/pkg-install
new file mode 100644
index 000000000000..5e2e6341de43
--- /dev/null
+++ b/devel/pmk/pkg-install
@@ -0,0 +1,16 @@
+# $FreeBSD#
+
+if [ "$2" != "POST-INSTALL" ]; then
+ exit 0
+fi
+
+pmkconf=%%PREFIX%%/etc/pmk/pmk.conf
+
+if [ -f $pmkconf ]; then
+ mv -f ${pmkconf} ${pmkconf}.bak
+ %%PREFIX%%/sbin/pmksetup
+ mv -f ${pmkconf} ${pmkconf}.dist
+ mv -f ${pmkconf}.bak ${pmkconf}
+fi
+
+exit 0
diff --git a/devel/pmk/pkg-plist b/devel/pmk/pkg-plist
index e59afe6796ad..47bdf52c5d61 100644
--- a/devel/pmk/pkg-plist
+++ b/devel/pmk/pkg-plist
@@ -2,6 +2,9 @@ bin/pmk
bin/pmkinstall
bin/pmkpc
bin/pmkscan
+@unexec if cmp -s %D/etc/pmk/pmk.conf %D/etc/pmk/pmk.conf.dist; then rm -f %D/etc/pmk/pmk.conf; fi
+etc/pmk/pmk.conf.dist
+@unexec rmdir %D/etc/pmk 2>/dev/null || true
sbin/pmksetup
share/pmk/pmk.conf.sample
share/pmk/pmkcfgtool.dat