aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-04-24 18:37:17 -0700
committerRobert Yang <liezhi.yang@windriver.com>2016-04-26 19:15:47 -0700
commitb59fd4c5891e116865197f6a71186a99b893924b (patch)
treefff27cb93adef121120f846c8cf0483b8e92b35d
parent60a6b185a9bd89574d7a0d74347be022a499d8c9 (diff)
downloadopenembedded-core-contrib-b59fd4c5891e116865197f6a71186a99b893924b.tar.gz
packagegroup.bbclass: set LICENSE and LIC_FILES_CHKSUM
* 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>
-rw-r--r--meta/classes/packagegroup.bbclass5
-rw-r--r--meta/conf/bitbake.conf2
2 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass
index 38bdbd3822..3674894e7f 100644
--- a/meta/classes/packagegroup.bbclass
+++ b/meta/classes/packagegroup.bbclass
@@ -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
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 40796aab14..66646c82fb 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -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 = ""