summaryrefslogtreecommitdiffstats
path: root/sysutils/penv
diff options
context:
space:
mode:
authorroam <roam@FreeBSD.org>2001-09-12 08:11:34 +0000
committerroam <roam@FreeBSD.org>2001-09-12 08:11:34 +0000
commit633fb561da54f542c816184e3d8bd324a1d71a99 (patch)
treeaf74df84ce1b5ebe8c7b3f5ea5d0ceac5424982f /sysutils/penv
parent16b06a95237e6777734c087a612f23a72b7a98bc (diff)
downloadFreeBSD-ports-633fb561da54f542c816184e3d8bd324a1d71a99.zip
FreeBSD-ports-633fb561da54f542c816184e3d8bd324a1d71a99.tar.gz
Create the database directory during install and remove it, if empty,
on uninstall. penv.conf.default/penv.conf handling a'la Apache. Bump PORTREVISION. Submitted by: olgeni
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 b4f23b1..db3f5a1 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 dc3da73..8d3647c 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
OpenPOWER on IntegriCloud