summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2017-09-02 16:18:56 +0000
committerjlam <jlam@pkgsrc.org>2017-09-02 16:18:56 +0000
commitcd09fc6849f4cdf88a3add801a72ff28f6e08d1d (patch)
tree1c5bd9263006c702a7fcc0aeae94a9284fb3677a /pkgtools
parent772533e75be262ee7579baa2f314af355425d6c7 (diff)
downloadpkgsrc-cd09fc6849f4cdf88a3add801a72ff28f6e08d1d.tar.gz
pkgtools/pkg_comp: Correct usage of ${PKG_SYSCONFDIR}.
Package configuration files should be found in ${PKG_SYSCONFDIR}, which can be modified by a user-settable variable. Look for the default sandboxctl(8) configuration files in ${PKG_SYSCONFDIR.sandboxctl} if that variable is set, or else in ${PKG_SYSCONFBASE}/sandboxctl. Fixes problem noted by Iain Hibbert on tech-pkg@. Bump the PKGREVISION to 2 due to changes in the binary package if PKG_SYSCONFDIR.pkg_comp is set to a non-default value.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_comp/Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgtools/pkg_comp/Makefile b/pkgtools/pkg_comp/Makefile
index 198aa572216..5e083e3b8ed 100644
--- a/pkgtools/pkg_comp/Makefile
+++ b/pkgtools/pkg_comp/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.59 2017/04/26 00:48:14 jmmv Exp $
+# $NetBSD: Makefile,v 1.60 2017/09/02 16:18:56 jlam Exp $
DISTNAME= pkg_comp-2.0
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=jmmv/}pkg_comp/releases/download/pkg_comp-2.0/
@@ -17,8 +17,8 @@ USE_LANGUAGES= # empty
USE_TOOLS= pkg-config
PKG_SYSCONFSUBDIR= pkg_comp
-CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASE}
-CONFIGURE_ARGS+= PKG_COMP_CONFSUBDIR=${PKG_SYSCONFSUBDIR}
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+= PKG_COMP_CONFSUBDIR=
CONFIGURE_ARGS+= SANDBOXCTL=${PREFIX}/sbin/sandboxctl
INSTALL_MAKE_FLAGS+= pkg_comp_confdir=${EGDIR}
EGDIR= ${PREFIX}/share/examples/pkg_comp
@@ -26,6 +26,14 @@ CONF_FILES+= ${EGDIR}/default.conf ${PKG_SYSCONFDIR}/default.conf
CONF_FILES+= ${EGDIR}/extra.mk.conf ${PKG_SYSCONFDIR}/extra.mk.conf
CONF_FILES+= ${EGDIR}/sandbox.conf ${PKG_SYSCONFDIR}/sandbox.conf
+# Substitute for the correct location of the configuration files
+# for sandboxctl.
+SUBST_CLASSES+= sandboxctl
+SUBST_STAGE.sandboxctl= pre-configure
+SUBST_FILES.sandboxctl= sandbox.conf.in
+SUBST_SED.sandboxctl= -e 's,__PKG_COMP_BASESYSCONFDIR__/sandboxctl/,${SANDBOXCTL_SYSCONFDIR}/,g'
+SANDBOXCTL_SYSCONFDIR= ${PKG_SYSCONFDIR.sandboxctl:U${PKG_SYSCONFBASE}/sandboxctl}
+
PKG_OPTIONS_VAR= PKG_OPTIONS.pkg_comp
PKG_SUPPORTED_OPTIONS= tests
PKG_SUGGESTED_OPTIONS= tests