DESCRIPTION = "Additional plugins for Enigma2" MAINTAINER = "Moritz Venn " SRCDATE = "20090630" PV = "1.0svn${SRCDATE}" DEPENDS = "enigma2" # python-transmissionrpc is required for emission but I still keep the # recipe to myself :-) SRC_URI = "svn://svn.freaque.net/enigma2/enigma2-plugins/;module=trunk" FILES_${PN} += " /usr/share/enigma2 /usr/share/fonts " CONFFILES_${PN} = "${sysconfdir}/enigma2/mounts.xml" inherit autotools S = "${WORKDIR}/trunk" python populate_packages_prepend () { enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d) do_split_packages(d, enigma2_plugindir, '(.*?/.*?)/.*', 'enigma2-plugin-%s', 'Enigma2 Plugin: %s', recursive=True, match_path=True, prepend=True) def getControlLines(mydir, d, package): import os try: src = open(mydir + package + "/CONTROL/control").read() except IOError: return for line in src.split("\n"): if line.startswith('Package: '): full_package = line[9:] if line.startswith('Depends: '): depends = ' '.join(line[9:].split(', ')) # XXX: ugly hack to fix depends for opendreambox 1.6 while i don't adjust my repository if bb.data.getVar('DISTRO_VERSION', d, 1) == "1.6.0": depends = depends.replace(' twisted-web', ' python-twisted-web') bb.data.setVar('RDEPENDS_' + full_package, depends, d) if line.startswith('Description: '): bb.data.setVar('DESCRIPTION_' + full_package, line[13:], d) # XXX: this code seems to work fine but unfortunately bb does not accept it try: src = open(mydir + package + "/CONTROL/conffiles").read() except IOError: return confFiles = bb.data.getVar('CONFFILES_enigma2-ritzmo-plugins', d, 1) if confFiles is None: confFiles = src.replace("\n", ' ') else: confFiles = ' '.join([confFiles, src.replace("\n", ' ')]) bb.data.setVar('CONFFILES_enigma2-ritzmo-plugins', confFiles, d) mydir = bb.data.getVar('D', d, 1) + "/../trunk/" for package in bb.data.getVar('PACKAGES', d, 1).split(): getControlLines(mydir, d, package.split('-')[-1]) }