enigma2-skins: use opendreambox-github instead of schwerkraft-git
[opendreambox.git] / meta-opendreambox / recipes-dreambox / enigma2 / enigma2-skins_3.999.bb
1 SUMMARY = "Skins for Enigma2"
2 LICENSE = "CLOSED"
3 SRCREV = "92db49a9d83851fe9f348b8263c1156706c3e21e"
4 SCHWERKRAFT_BRANCH = "4.0"
5 PE = "1"
6
7 inherit allarch autotools opendreambox-github
8
9 PACKAGES_DYNAMIC = "enigma2-skin-*"
10 PACKAGES += "${PN}-meta"
11
12 FILES_${PN} += " /usr/share/enigma2 /usr/share/fonts "
13 FILES_${PN}-meta = "${datadir}/meta"
14
15 python populate_packages_prepend() {
16         output_pattern = 'enigma2-skin-%s'
17         enigma2_skindir = os.path.join(d.getVar('datadir', True), 'enigma2')
18         do_split_packages(d, enigma2_skindir, '(.*?)/.*', output_pattern, 'Enigma2 Skin: %s', recursive=True, extra_depends='', prepend=True, match_path=True)
19
20         def parseControlFile(pkg, skindir):
21                 filename = os.path.join(skindir, 'CONTROL/control')
22                 if os.path.exists(filename):
23                         src = open(filename).read()
24                         for line in src.splitlines():
25                                 name, value = line.strip().split(': ', 1)
26                                 if name == 'Description':
27                                         d.setVar('DESCRIPTION_%s' % pkg, value)
28                                 elif name == 'Depends':
29                                         d.setVar('RDEPENDS_%s' % pkg, ' '.join(value.split(', ')))
30                                 elif name == 'Replaces':
31                                         d.setVar('RREPLACES_%s' + pkg, ' '.join(value.split(', ')))
32                                 elif name == 'Conflicts':
33                                         d.setVar('RCONFLICTS_%s' + pkg, ' '.join(value.split(', ')))
34
35         skinsdir = os.path.join(d.getVar('S', True), 'skins')
36         packages = d.getVar('PACKAGES', True).split()
37         for subdir in os.walk(skinsdir).next()[1]:
38                 pkg = output_pattern % legitimize_package_name(subdir)
39                 if pkg in packages:
40                         parseControlFile(pkg, os.path.join(skinsdir, subdir))
41 }