summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2000-07-14 12:39:30 +0000
committeragc <agc@pkgsrc.org>2000-07-14 12:39:30 +0000
commit06a57d66d0054c05fe01defeb25c312035a3d99e (patch)
tree28e9b9cbc33b257c1e62801554c8285ebdd77c62
parente303291e92ad7b8094816d0edf328021009d8213 (diff)
downloadpkgsrc-06a57d66d0054c05fe01defeb25c312035a3d99e.tar.gz
Introduce the mk.conf definition for PRIV_CONF_DIR, which defaults to
${LOCALBASE}/etc, and is the parent directory of the priv package's user configuration data. Modify Makefile to pick up this definition, and pass it on as an argument to the configure script. Modify the PLIST to include this location, and pre-process the PLIST at install time to set the correct location.
-rw-r--r--mk/mk.conf.example8
-rw-r--r--security/priv/Makefile13
-rw-r--r--security/priv/pkg/PLIST6
3 files changed, 22 insertions, 5 deletions
diff --git a/mk/mk.conf.example b/mk/mk.conf.example
index 5078b0baac6..9ae0b308f03 100644
--- a/mk/mk.conf.example
+++ b/mk/mk.conf.example
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf.example,v 1.143 2000/07/06 15:12:04 hubertf Exp $
+# $NetBSD: mk.conf.example,v 1.144 2000/07/14 12:39:53 agc Exp $
#
# Sample /etc/mk.conf file, which can be used to set specific values
@@ -552,6 +552,12 @@ PAPERSIZE= A4
# Possible: YES, not defined
# Default: not defined
+#PRIV_CONF_DIR=${LOCALBASE}/etc
+# Specify the parent of the directory for pkgsrc/security/priv
+# package's configuration data.
+# Possible: Any valid directory
+# Default: ${LOCALBASE}/etc
+
#QPOPPER_SERVERMODE=
# Used in qpopper package to enable server mode.
# Possible: defined, not defined
diff --git a/security/priv/Makefile b/security/priv/Makefile
index 2aa579936d3..495df895ee1 100644
--- a/security/priv/Makefile
+++ b/security/priv/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2000/07/14 11:48:19 agc Exp $
+# $NetBSD: Makefile,v 1.3 2000/07/14 12:39:30 agc Exp $
#
DISTNAME= priv-1.0-beta
@@ -10,4 +10,15 @@ MAINTAINER= simonb@netbsd.org
GNU_CONFIGURE= yes
+PLIST_SRC= ${WRKDIR}/plist
+
+.include "../../mk/bsd.prefs.mk"
+
+PRIV_CONF_DIR?= ${LOCALBASE}/etc
+
+CONFIGURE_ARGS+= --sysconfdir=${PRIV_CONF_DIR}
+
+post-install:
+ ${SED} -e 's|@PRIV_CONF_DIR@|${PRIV_CONF_DIR}|g' ${PKGDIR}/PLIST > ${PLIST_SRC}
+
.include "../../mk/bsd.pkg.mk"
diff --git a/security/priv/pkg/PLIST b/security/priv/pkg/PLIST
index 4a050a2486b..7a2a19b12e9 100644
--- a/security/priv/pkg/PLIST
+++ b/security/priv/pkg/PLIST
@@ -1,5 +1,5 @@
-@comment $NetBSD: PLIST,v 1.2 2000/07/14 11:46:28 agc Exp $
+@comment $NetBSD: PLIST,v 1.3 2000/07/14 12:39:31 agc Exp $
bin/priv
man/man1/priv.1
-@exec mkdir -p %D/etc/priv || true
-@dirrm etc/priv
+@exec mkdir -p @PRIV_CONF_DIR@/priv || true
+@unexec rmdir @PRIV_CONF_DIR@/priv || true