opendreambox 2.0
[opendreambox.git] / meta-opendreambox / recipes-dreambox / enigma2 / enigma2-plugins_3.999.bb
1 DESCRIPTION = "Additional plugins for Enigma2"
2 LICENSE = "Proprietary"
3 LIC_FILES_CHKSUM = "file://COPYING;md5=8e37f34d0e40d32ea2bc90ee812c9131"
4 DEPENDS = "enigma2 python-daap python-gdata python-mutagen python-pycrypto python-pyopenssl streamripper"
5 SRCREV = "bb4b44665e744b0c64399dcc674ecac97a4bcbfd"
6 PR = "r0"
7
8 SRC_URI += "file://cdinfo_depends.patch"
9
10 inherit autotools schwerkraft-git
11
12 EXTRA_OECONF = " \
13         BUILD_SYS=${BUILD_SYS} \
14         HOST_SYS=${HOST_SYS} \
15         STAGING_INCDIR=${STAGING_INCDIR} \
16         STAGING_LIBDIR=${STAGING_LIBDIR} \
17 "
18
19 PACKAGES_DYNAMIC = "enigma2-plugin-*"
20 PACKAGES += "${PN}-meta"
21
22 FILES_${PN} += "${datadir}/enigma2 ${datadir}/fonts"
23 FILES_${PN}-meta = "${datadir}/meta"
24
25 python populate_packages_prepend() {
26         enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
27         do_split_packages(d, enigma2_plugindir, '^(\w+/\w+)', 'enigma2-plugin-%s', '%s', recursive=True, match_path=True, prepend=True)
28         do_split_packages(d, enigma2_plugindir, '^(\w+/\w+).*/.*\.la$', 'enigma2-plugin-%s-dev', '%s (development)', recursive=True, match_path=True, prepend=True)
29         do_split_packages(d, enigma2_plugindir, '^(\w+/\w+).*/.*\.a$', 'enigma2-plugin-%s-staticdev', '%s (static development)', recursive=True, match_path=True, prepend=True)
30         do_split_packages(d, enigma2_plugindir, '^(\w+/\w+).*/\.debug/', 'enigma2-plugin-%s-dbg', '%s (debug)', recursive=True, match_path=True, prepend=True)
31         def parseControlFile(dir, d, package):
32                 import os
33                 src = open(dir + "/" + package.split('-')[-1] + "/CONTROL/control").read()
34                 for line in src.splitlines():
35                         name, value = line.strip().split(': ', 1)
36                         if name == 'Description':
37                                 bb.data.setVar('DESCRIPTION_' + package, value, d)
38                         elif name == 'Depends':
39                                 bb.data.setVar('RDEPENDS_' + package, ' '.join(value.split(', ')), d)
40                         elif name == 'Replaces':
41                                 bb.data.setVar('RREPLACES_' + package, ' '.join(value.split(', ')), d)
42                         elif name == 'Conflicts':
43                                 bb.data.setVar('RCONFLICTS_' + package, ' '.join(value.split(', ')), d)
44         srcdir = bb.data.getVar('S', d, 1)
45         for package in bb.data.getVar('PACKAGES', d, 1).split():
46                 if package.startswith('enigma2-plugin-') and not package.endswith('-dev') and not package.endswith('-dbg') and not package.endswith('-staticdev'):
47                         parseControlFile(srcdir, d, package)
48 }