aboutsummaryrefslogtreecommitdiff
path: root/sysutils/penv
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2001-09-12 08:11:34 +0000
committerPeter Pentchev <roam@FreeBSD.org>2001-09-12 08:11:34 +0000
commit2d54a0b8b170ebfff3238c47b2d05a5080849218 (patch)
tree54d86ded485e425d84e323ab0600191f45bee75b /sysutils/penv
parent7c0bb5a399b9c82c798a04673bc51be4febd1aa4 (diff)
downloadports-2d54a0b8b170ebfff3238c47b2d05a5080849218.tar.gz
ports-2d54a0b8b170ebfff3238c47b2d05a5080849218.zip
Notes
Diffstat (limited to 'sysutils/penv')
-rw-r--r--sysutils/penv/Makefile8
-rw-r--r--sysutils/penv/pkg-plist4
2 files changed, 12 insertions, 0 deletions
diff --git a/sysutils/penv/Makefile b/sysutils/penv/Makefile
index b4f23b1d9413..db3f5a1f63bc 100644
--- a/sysutils/penv/Makefile
+++ b/sysutils/penv/Makefile
@@ -7,6 +7,7 @@
PORTNAME= penv
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://devel.ringlet.net/sysutils/penv/
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.b/pre/}
@@ -27,9 +28,16 @@ MAKE_ENV+= RELEASE=yes
DBDIR?= /var/db/${PORTNAME}
+PLIST_SUB+= DBDIR=${DBDIR}
+
post-install:
${MKDIR} ${PREFIX}/etc
+ ${MKDIR} ${DBDIR}
${INSTALL_DATA} ${WRKSRC}/penv.conf.default ${PREFIX}/etc
+ if [ ! -e ${PREFIX}/etc/penv.conf ]; then \
+ ${INSTALL_DATA} ${WRKSRC}/penv.conf.default \
+ ${PREFIX}/etc/penv.conf; \
+ fi
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}/html
${INSTALL_DATA} ${WRKSRC}/doc/html/* ${DOCSDIR}/html
diff --git a/sysutils/penv/pkg-plist b/sysutils/penv/pkg-plist
index dc3da73171ae..8d3647c5eb8b 100644
--- a/sysutils/penv/pkg-plist
+++ b/sysutils/penv/pkg-plist
@@ -1,6 +1,10 @@
bin/penv
+@unexec if cmp -s %D/etc/penv.conf %D/etc/penv.conf.default; then rm -f %D/etc/penv.conf; fi
etc/penv.conf.default
+@exec [ -f %B/penv.conf ] || cp %B/%f %B/penv.conf
%%PORTDOCS%%share/doc/penv/html/created.with.vim.gif
%%PORTDOCS%%share/doc/penv/html/index.html
%%PORTDOCS%%@dirrm share/doc/penv/html
%%PORTDOCS%%@dirrm share/doc/penv
+@exec mkdir -p %%DBDIR%%
+@unexec rmdir %%DBDIR%% 2>/dev/null || true