pkg: use specific CONFSNAME_${file} for FreeBSD.conf

Setting CONFSNAME directly is a little more complicated for downstream
consumers, as any additional CONFS that are added here will inherit the
group name by default.  This is perhaps arguably a design flaw in CONFS
because inheriting NAME will never give a good result when additional
files are added, but this is a low-effort change.

While we're here, pull FreeBSD.conf.${branch} out into a PKGCONF
variable so one can just drop a new repo config in entirely with a new
naming scheme. CONFSNAME gets set based on chopping anything off after
".conf", so that, e.g.:

- FooBSD.conf => FooBSD.conf
- FooBSD.conf.internal => FooBSD.conf

Reviewed by:	bapt, manu
Differential Revision:	https://reviews.freebsd.org/D28767
This commit is contained in:
Kyle Evans 2021-02-17 22:10:46 -06:00
parent 40b9f924b1
commit d35164539b

View File

@ -15,8 +15,9 @@ PKGCONFBRANCH?= latest
. endif . endif
. endif . endif
.endif .endif
CONFS= FreeBSD.conf.${PKGCONFBRANCH} PKGCONF?= FreeBSD.conf.${PKGCONFBRANCH}
CONFSNAME= FreeBSD.conf CONFS= ${PKGCONF}
CONFSNAME_${PKGCONF}= ${PKGCONF:C/\.conf.+$/.conf/}
CONFSDIR= /etc/pkg CONFSDIR= /etc/pkg
CONFSMODE= 644 CONFSMODE= 644
PROG= pkg PROG= pkg