diff options
-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 9bdacea..0f73c22 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 0000000..5e2e634 --- /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 e59afe6..47bdf52 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 |