summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
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