aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorroam <roam@FreeBSD.org>2001-09-12 16:11:34 +0800
committerroam <roam@FreeBSD.org>2001-09-12 16:11:34 +0800
commit633fb561da54f542c816184e3d8bd324a1d71a99 (patch)
treeaf74df84ce1b5ebe8c7b3f5ea5d0ceac5424982f /sysutils
parent16b06a95237e6777734c087a612f23a72b7a98bc (diff)
downloadfreebsd-ports-gnome-633fb561da54f542c816184e3d8bd324a1d71a99.tar.gz
freebsd-ports-gnome-633fb561da54f542c816184e3d8bd324a1d71a99.tar.zst
freebsd-ports-gnome-633fb561da54f542c816184e3d8bd324a1d71a99.zip
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')
-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