]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
packagegroup.bbclass: set LICENSE and LIC_FILES_CHKSUM
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 27 Apr 2016 02:20:27 +0000 (19:20 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 May 2016 09:30:59 +0000 (10:30 +0100)
* Use "??=" in bitbake.conf to set LICENSE, so that it can overrided by
  packagegroup.bbclass and recipes.

* Use "?=" to set LICENSE and LIC_FILES_CHKSUM to MIT by default
  in packagegroup.bbclass, this won't impact any packagegroup recipes
  which use non-MIT license, since they can be overrided by the recipe.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/packagegroup.bbclass
meta/conf/bitbake.conf

index 38bdbd382217271ed5b5fba11bb0110872858524..3674894e7f1c1069d20fa97444993edde64bc6c3 100644 (file)
@@ -14,6 +14,11 @@ PACKAGE_ARCH ?= "all"
 # Fully expanded - so it applies the overrides as well
 PACKAGE_ARCH_EXPANDED := "${PACKAGE_ARCH}"
 
+LICENSE ?= "MIT"
+LIC_FILES_CHKSUM ?= "${@oe.utils.ifelse(d.getVar('LICENSE', True) == 'MIT', \
+                     'file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420', \
+                    '')}"
+
 inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED', True) == 'all', 'allarch', '')}
 
 # This automatically adds -dbg and -dev flavours of all PACKAGES
index 40796aab148a07c782018fc12feb6bd172b9a2e3..66646c82fbdc649c9d42cc77522fb9e10222ceb8 100644 (file)
@@ -247,7 +247,7 @@ SUMMARY_${PN}-doc ?= "${SUMMARY} - Documentation files"
 DESCRIPTION_${PN}-doc ?= "${DESCRIPTION}  \
 This package contains documentation."
 
-LICENSE = "INVALID"
+LICENSE ??= "INVALID"
 MAINTAINER = "OE-Core Developers <openembedded-core@lists.openembedded.org>"
 HOMEPAGE = ""