enigma2-plugins: update to 20110210 and define a git srcref
[openembedded.git] / recipes / 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 # if you want experimental, use:
7 SRCREV="643cde323453d3a608be112498835ee46e692266"
8 SRCDATE="20110210"
9 BRANCH="master"
10 PV = "experimental-git${SRCDATE}"
11
12 PR = "r0"
13 SRC_URI="git://schwerkraft.elitedvb.net/enigma2-plugins/enigma2-plugins.git;protocol=git;branch=${BRANCH};tag=${SRCREV}"
14
15 EXTRA_OECONF = " \
16         BUILD_SYS=${BUILD_SYS} \
17         HOST_SYS=${HOST_SYS} \
18         STAGING_INCDIR=${STAGING_INCDIR} \
19         STAGING_LIBDIR=${STAGING_LIBDIR} \
20 "
21
22 FILES_${PN} += " /usr/share/enigma2 /usr/share/fonts "
23 FILES_${PN}-meta = "${datadir}/meta"
24 PACKAGES += "${PN}-meta"
25 PACKAGE_ARCH = "${MACHINE_ARCH}"
26
27 inherit autotools
28
29 S = "${WORKDIR}/git"
30
31 DEPENDS = "python-pyopenssl python-gdata streamripper python-mutagen python-daap"
32 DEPENDS += "enigma2"
33
34 python populate_packages_prepend () {
35         enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
36
37         do_split_packages(d, enigma2_plugindir, '(.*?/.*?)/.*', 'enigma2-plugin-%s', 'Enigma2 Plugin: %s', recursive=True, match_path=True, prepend=True)
38
39         def getControlLines(mydir, d, package):
40                 import os
41                 try:
42                         #ac3lipsync is renamed since 20091121 to audiosync.. but rename in cvs is not possible without lost of revision history..
43                         #so the foldername is still ac3lipsync
44                         if package == 'audiosync':
45                                 package = 'ac3lipsync'
46                         src = open(mydir + package + "/CONTROL/control").read()
47                 except IOError:
48                         return
49                 for line in src.split("\n"):
50                         if line.startswith('Package: '):
51                                 full_package = line[9:]
52                         if line.startswith('Depends: '):
53                                 bb.data.setVar('RDEPENDS_' + full_package, ' '.join(line[9:].split(', ')), d)
54                         if line.startswith('Description: '):
55                                 bb.data.setVar('DESCRIPTION_' + full_package, line[13:], d)
56                         if line.startswith('Replaces: '):
57                                 bb.data.setVar('RREPLACES_' + full_package, ' '.join(line[10:].split(', ')), d)
58                         if line.startswith('Conflicts: '):
59                                 bb.data.setVar('RCONFLICTS_' + full_package, ' '.join(line[11:].split(', ')), d)
60                         if line.startswith('Maintainer: '):
61                                 bb.data.setVar('MAINTAINER_' + full_package, line[12:], d)
62
63         mydir = bb.data.getVar('D', d, 1) + "/../git/"
64         for package in bb.data.getVar('PACKAGES', d, 1).split():
65                 getControlLines(mydir, d, package.split('-')[-1])
66 }