aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2016-02-04 15:32:03 +0000
committerGlen Barber <gjb@FreeBSD.org>2016-02-04 15:32:03 +0000
commit5c52b2f5ca1b5b922f322f23dc27ea2362deabdd (patch)
treeb2cc400eea676f2898c9855900556d6f39d5b1f8 /Makefile.inc1
parentb3075f337b9ec70bc1ce7fdbe0258849d797e21e (diff)
downloadsrc-5c52b2f5ca1b5b922f322f23dc27ea2362deabdd.tar.gz
src-5c52b2f5ca1b5b922f322f23dc27ea2362deabdd.zip
Rework the way <packagename>.ucl files are generated.
One of the major pain points with how this was implemented is the requirement of in-tree, hard-coded <name>.ucl, as well as <name>-<suffix>.ucl where <suffix> can be lib32, profile, development, debug, or any combination of the four. This created significant overhead when adding new packages and any of the files in any of the combinations were missing. Instead of test(1)-ing if the <packagename>.ucl file exists, hand off to a script to figure out what the final ucl file name should be before invoking pkg(8). The default behavior is 'template.ucl' is used as a fallback. This affects only the userland packages, as the kernel code is already smart enough to handle these variations. Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/projects/release-pkg/; revision=295262
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc117
1 files changed, 4 insertions, 13 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 8fc07557dbf1..ded62724a588 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1393,22 +1393,13 @@ create-world-packages: _pkgbootstrap
${DESTDIR}/METALOG
@for plist in ${DESTDIR}/*.plist; do \
plist=$${plist##*/} ; \
- test -f ${SRCDIR}/release/packages/$${plist%.plist}.ucl || \
- ( echo "Unkown package FreeBSD-$${plist%.plist}" ; false ) ; \
+ pkgname=$${plist%.plist} ; \
+ sh ${SRCDIR}/release/packages/generate-ucl.sh -o $${pkgname} \
+ -s ${SRCDIR} -u ${DESTDIR}/$${pkgname}.ucl ; \
done
- @cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \
- pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \
- for plist in ${DESTDIR}/*.plist; do \
+ @for plist in ${DESTDIR}/*.plist; do \
plist=$${plist##*/} ; \
pkgname=$${plist%.plist} ; \
- sed -e "s/%VERSION%/${PKG_VERSION}/" \
- -e "s/%PKGNAME%/$${pkgname}/" \
- -e "s/%COMMENT%/Generic comment for $${pkgname}/" \
- -e "s/%DESC%/Generic description for $${pkgname}/" \
- -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \
- -e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g" \
- ${SRCDIR}/release/packages/$${pkgname}.ucl \
- > ${DESTDIR}/$${pkgname}.ucl ; \
awk -F\" ' \
/^name/ { printf("===> Creating %s-", $$2); next } \
/^version/ { print $$2; next } \