summaryrefslogtreecommitdiff
path: root/classes/src_distribute.bbclass
blob: 5daf5260183793f6996008164770e368a3670591 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
include conf/licenses.conf

SRC_DISTRIBUTECOMMAND[func] = "1"
python do_distribute_sources () {
	l = bb.data.createCopy(d)
	bb.data.update_data(l)
	licenses = (bb.data.getVar('LICENSE', d, 1) or "").split()
	if not licenses:
		bb.note("LICENSE not defined")
	src_distribute_licenses = (bb.data.getVar('SRC_DISTRIBUTE_LICENSES', d, 1) or "").split()
	# Explanation:
	# Space seperated items in LICENSE must *all* be distributable
	# Each space seperated item may be used under any number of | seperated licenses.
	# If any of those | seperated licenses are distributable, then that component is.
	# i.e. LICENSE = "GPL LGPL"
	#     In this case, both components are distributable.
	# LICENSE = "GPL|QPL|Proprietary"
	#     In this case, GPL is distributable, so the component is.
	valid = 1
	for l in licenses:
		lvalid = 0
		for i in l.split("|"):
			if i in src_distribute_licenses:
				lvalid = 1
		if lvalid != 1:
			valid = 0
	if valid == 0:
		bb.note("Licenses (%s) are not all listed in SRC_DISTRIBUTE_LICENSES, skipping source distribution" % licenses)
		return
	import re
	for s in (bb.data.getVar('A', d, 1) or "").split():
		s = re.sub(';.*$', '', s)
		cmd = bb.data.getVar('SRC_DISTRIBUTECOMMAND', d, 1)
		if not cmd:
			raise bb.build.FuncFailed("Unable to distribute sources, SRC_DISTRIBUTECOMMAND not defined")
		bb.data.setVar('SRC', s, d)
		bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d)
}

addtask distribute_sources before do_build after do_fetch
369ed1b391af1e0a513'>gpe-conf: Add version 0.1.29, update cvs version and drop a pile of old relea...Florian Boor24 2006-01-21gpe-conf: Add 0.1.28.Florian Boor1 2006-01-10gpe-conf_cvs.bb: bump PVPhilipp Zabel1 2006-01-07Convert CVSDATE -> SRCDATE. Also standardise cvs and svn PVs to x.x.x+cvsYYYY...Richard Purdie1 2005-12-21gpe-conf: add 0.1.27Koen Kooi1 2005-12-06disapproval of revision '1836da10f903d9ee68a7255b7a5d899128f4f43c'Marcin Juszkiewicz1 2005-12-06module-init-tools: prefer 3.2.1 over 3.2-pre4Philipp Zabel1 2005-11-12gpe-conf cvs: bump PVKoen Kooi1 2005-11-01gpe-conf: add 0.1.26Koen Kooi1 2005-10-31lots of files: use ${HANDHELDS_CVS} and update bitbake.conf to use anoncvs.ha...Koen Kooi1 2005-09-09packages/gpe-conf/gpe-conf_cvs.bb: add (disabled) cvs version of gpe-conf and...Koen Kooi3 2005-08-24Add new version of gpe-conf.Florian Boor1 2005-06-30import clean BK tree at cset 1.3670Koen Kooi19 2005-05-18Merge bk://oe-devel.bkbits.net/openembeddednslu2-linux.adm@bkbits.net1 2005-05-11Merge bk://oe-devel.bkbits.net/openembeddednslu2-linux.adm@bkbits.net1 2005-04-27gpe-conf_0.1.23.bb: tweak gpe-conf.bb, courtesy Florian BoorKoen Kooi1 2005-04-20gpe-conf_0.1.23.bb: update patchKoen Kooi2 2005-04-20gpe-conf_0.1.23.bb: remove popup.hKoen Kooi2 2005-04-13gpe-conf_0.1.23.bb: apply categories patchKoen Kooi1 2005-04-03Add gpe-conf 0.1.23Koen Kooi1 2005-02-23Merge bk://oe-devel.bkbits.net/openembeddednslu2-linux.adm@bkbits.net2 2005-02-17Merge oe-devel@oe-devel.bkbits.net:openembeddedrjt@cambridgebroadband.com3 2005-01-01Merge bk://oe-devel.bkbits.net/openembeddednslu2-linux.adm@bkbits.net5 2004-12-30Merge bk://oe-devel.bkbits.net/openembeddednslu2-linux.adm@bkbits.net2 2004-12-09Merge oe-devel@oe-devel.bkbits.net:openembeddedChris Larson14