packages/enigma2/enigma2-plugins.bb: conf for release 2.8.0
[vuplus_openembedded] / packages / enigma2 / enigma2-plugins.bb
1 DESCRIPTION = "Additional plugins for Enigma2"
2 MAINTAINER = "Felix Domke <tmbinc@elitedvb.net>"
3
4 PACKAGES_DYNAMIC = "enigma2-plugin-*"
5
6 SRCDATE = "20100401"
7
8 # if you want the 2.8.0 release, use
9 TAG = ";tag=enigma2-plugins_rel28"
10 PV = "2.8cvs${SRCDATE}"
11
12 # if you want experimental, use:
13 #TAG = ""
14 #PV = "experimental-cvs${SRCDATE}"
15
16 SRC_URI = "cvs://anonymous@cvs.schwerkraft.elitedvb.net/cvsroot/enigma2-plugins;module=enigma2-plugins;method=pserver${TAG};date=${SRCDATE}"
17
18 FILES_${PN} += " /usr/share/enigma2 /usr/share/fonts "
19 FILES_${PN}-meta = "${datadir}/meta"
20 PACKAGES += "${PN}-meta"
21
22 inherit autotools
23
24 S = "${WORKDIR}/enigma2-plugins"
25
26 DEPENDS = "python-pyopenssl python-gdata streamripper python-mutagen"
27 DEPENDS += "enigma2"
28
29 python populate_packages_prepend () {
30         enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
31
32         do_split_packages(d, enigma2_plugindir, '(.*?/.*?)/.*', 'enigma2-plugin-%s', 'Enigma2 Plugin: %s', recursive=True, match_path=True, prepend=True)
33
34         def getControlLines(mydir, d, package):
35                 import os
36                 try:
37                         #ac3lipsync is renamed since 20091121 to audiosync.. but rename in cvs is not possible without lost of revision history..
38                         #so the foldername is still ac3lipsync
39                         if package == 'audiosync':
40                                 package = 'ac3lipsync'
41                         src = open(mydir + package + "/CONTROL/control").read()
42                 except IOError:
43                         return
44                 for line in src.split("\n"):
45                         if line.startswith('Package: '):
46                                 full_package = line[9:]
47                         if line.startswith('Depends: '):
48                                 bb.data.setVar('RDEPENDS_' + full_package, ' '.join(line[9:].split(', ')), d)
49                         if line.startswith('Description: '):
50                                 bb.data.setVar('DESCRIPTION_' + full_package, line[13:], d)
51                         if line.startswith('Replaces: '):
52                                 bb.data.setVar('RREPLACES_' + full_package, ' '.join(line[10:].split(', ')), d)
53                         if line.startswith('Conflicts: '):
54                                 bb.data.setVar('RCONFLICTS_' + full_package, ' '.join(line[11:].split(', ')), d)
55                         if line.startswith('Maintainer: '):
56                                 bb.data.setVar('MAINTAINER_' + full_package, line[12:], d)
57
58
59         mydir = bb.data.getVar('D', d, 1) + "/../enigma2-plugins/"
60         for package in bb.data.getVar('PACKAGES', d, 1).split():
61                 getControlLines(mydir, d, package.split('-')[-1])
62 }