diff options
author | Sean Chittenden <seanc@FreeBSD.org> | 2004-11-30 07:56:10 +0000 |
---|---|---|
committer | Sean Chittenden <seanc@FreeBSD.org> | 2004-11-30 07:56:10 +0000 |
commit | 2d0db4595dd94b0582f23bc055bb7d36b76ee032 (patch) | |
tree | 19dd5eae61b84ef1506f6c798f19079389a8fda0 | |
parent | o) I'm not using syncal anymore for several month so it would be best to give (diff) |
Update pmk to run pmksetup by default and remove pmk.conf only if it's the
same as the default config. Bump port version.
-rw-r--r-- | devel/pmk/Makefile | 12 | ||||
-rw-r--r-- | devel/pmk/pkg-install | 16 | ||||
-rw-r--r-- | devel/pmk/pkg-plist | 3 |
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 |