Sat Sep 2 16:18:56 2017 UTC ()
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.


(jlam)
diff -r1.59 -r1.60 pkgsrc/pkgtools/pkg_comp/Makefile

cvs diff -r1.59 -r1.60 pkgsrc/pkgtools/pkg_comp/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_comp/Makefile 2017/04/26 00:48:14 1.59
+++ pkgsrc/pkgtools/pkg_comp/Makefile 2017/09/02 16:18:56 1.60
@@ -1,41 +1,49 @@ @@ -1,41 +1,49 @@
1# $NetBSD: Makefile,v 1.59 2017/04/26 00:48:14 jmmv Exp $ 1# $NetBSD: Makefile,v 1.60 2017/09/02 16:18:56 jlam Exp $
2 2
3DISTNAME= pkg_comp-2.0 3DISTNAME= pkg_comp-2.0
4PKGREVISION= 1 4PKGREVISION= 2
5CATEGORIES= sysutils 5CATEGORIES= sysutils
6MASTER_SITES= ${MASTER_SITE_GITHUB:=jmmv/}pkg_comp/releases/download/pkg_comp-2.0/ 6MASTER_SITES= ${MASTER_SITE_GITHUB:=jmmv/}pkg_comp/releases/download/pkg_comp-2.0/
7 7
8MAINTAINER= jmmv@NetBSD.org 8MAINTAINER= jmmv@NetBSD.org
9COMMENT= Automates builds of packages and manages pkgsrc trees 9COMMENT= Automates builds of packages and manages pkgsrc trees
10LICENSE= modified-bsd 10LICENSE= modified-bsd
11 11
12DEPENDS= sandboxctl>=1.0:../../sysutils/sandboxctl 12DEPENDS= sandboxctl>=1.0:../../sysutils/sandboxctl
13 13
14GNU_CONFIGURE= yes 14GNU_CONFIGURE= yes
15TEST_TARGET= check 15TEST_TARGET= check
16USE_LANGUAGES= # empty 16USE_LANGUAGES= # empty
17USE_TOOLS= pkg-config 17USE_TOOLS= pkg-config
18 18
19PKG_SYSCONFSUBDIR= pkg_comp 19PKG_SYSCONFSUBDIR= pkg_comp
20CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASE} 20CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
21CONFIGURE_ARGS+= PKG_COMP_CONFSUBDIR=${PKG_SYSCONFSUBDIR} 21CONFIGURE_ARGS+= PKG_COMP_CONFSUBDIR=
22CONFIGURE_ARGS+= SANDBOXCTL=${PREFIX}/sbin/sandboxctl 22CONFIGURE_ARGS+= SANDBOXCTL=${PREFIX}/sbin/sandboxctl
23INSTALL_MAKE_FLAGS+= pkg_comp_confdir=${EGDIR} 23INSTALL_MAKE_FLAGS+= pkg_comp_confdir=${EGDIR}
24EGDIR= ${PREFIX}/share/examples/pkg_comp 24EGDIR= ${PREFIX}/share/examples/pkg_comp
25CONF_FILES+= ${EGDIR}/default.conf ${PKG_SYSCONFDIR}/default.conf 25CONF_FILES+= ${EGDIR}/default.conf ${PKG_SYSCONFDIR}/default.conf
26CONF_FILES+= ${EGDIR}/extra.mk.conf ${PKG_SYSCONFDIR}/extra.mk.conf 26CONF_FILES+= ${EGDIR}/extra.mk.conf ${PKG_SYSCONFDIR}/extra.mk.conf
27CONF_FILES+= ${EGDIR}/sandbox.conf ${PKG_SYSCONFDIR}/sandbox.conf 27CONF_FILES+= ${EGDIR}/sandbox.conf ${PKG_SYSCONFDIR}/sandbox.conf
28 28
 29# Substitute for the correct location of the configuration files
 30# for sandboxctl.
 31SUBST_CLASSES+= sandboxctl
 32SUBST_STAGE.sandboxctl= pre-configure
 33SUBST_FILES.sandboxctl= sandbox.conf.in
 34SUBST_SED.sandboxctl= -e 's,__PKG_COMP_BASESYSCONFDIR__/sandboxctl/,${SANDBOXCTL_SYSCONFDIR}/,g'
 35SANDBOXCTL_SYSCONFDIR= ${PKG_SYSCONFDIR.sandboxctl:U${PKG_SYSCONFBASE}/sandboxctl}
 36
29PKG_OPTIONS_VAR= PKG_OPTIONS.pkg_comp 37PKG_OPTIONS_VAR= PKG_OPTIONS.pkg_comp
30PKG_SUPPORTED_OPTIONS= tests 38PKG_SUPPORTED_OPTIONS= tests
31PKG_SUGGESTED_OPTIONS= tests 39PKG_SUGGESTED_OPTIONS= tests
32 40
33.include "../../mk/bsd.options.mk" 41.include "../../mk/bsd.options.mk"
34 42
35.if !empty(PKG_OPTIONS:Mtests) 43.if !empty(PKG_OPTIONS:Mtests)
36. include "../../devel/atf/buildlink3.mk" 44. include "../../devel/atf/buildlink3.mk"
37PLIST_SUBST+= TESTS= 45PLIST_SUBST+= TESTS=
38.else 46.else
39CONFIGURE_ARGS+= --with-atf=no 47CONFIGURE_ARGS+= --with-atf=no
40PLIST_SUBST+= TESTS=@comment 48PLIST_SUBST+= TESTS=@comment
41 49