aboutsummaryrefslogtreecommitdiffstats
path: root/devel/pmk
diff options
context:
space:
mode:
authorseanc <seanc@FreeBSD.org>2004-11-30 15:56:10 +0800
committerseanc <seanc@FreeBSD.org>2004-11-30 15:56:10 +0800
commit0d208ea559a6fb4e7d9cef4945eab39dcf06e843 (patch)
treeb44071f8324c0c2b7831b665da925dd7b039dd5b /devel/pmk
parentf972b9dcf0036508265416a3a9b45751e05f00f0 (diff)
downloadfreebsd-ports-gnome-0d208ea559a6fb4e7d9cef4945eab39dcf06e843.tar.gz
freebsd-ports-gnome-0d208ea559a6fb4e7d9cef4945eab39dcf06e843.tar.zst
freebsd-ports-gnome-0d208ea559a6fb4e7d9cef4945eab39dcf06e843.zip
Update pmk to run pmksetup by default and remove pmk.conf only if it's the
same as the default config. Bump port version.
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