From 633fb561da54f542c816184e3d8bd324a1d71a99 Mon Sep 17 00:00:00 2001 From: roam Date: Wed, 12 Sep 2001 08:11:34 +0000 Subject: 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 --- sysutils/penv/Makefile | 8 ++++++++ sysutils/penv/pkg-plist | 4 ++++ 2 files changed, 12 insertions(+) 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 -- cgit