1 SUMMARY = "Additional plugins for Enigma2"
2 LICENSE = "Proprietary"
3 LIC_FILES_CHKSUM = "file://COPYING;md5=8e37f34d0e40d32ea2bc90ee812c9131"
4 DEPENDS = "enigma2 gettext-native gstreamer1.0 libtirpc nfs-utils openssl"
6 SRC_URI += "file://print.mak"
8 inherit autotools-brokensep pkgconfig pythonnative
16 # create lists of files installed outside of "${libdir}/enigma2/python/Plugins" or "${datadir}/meta"
17 rm -rf ${INSTALL_ROOTDIR}
18 install -d ${INSTALL_ROOTDIR}
19 SUBDIRS=`make -f Makefile -f ${WORKDIR}/print.mak print-SUBDIRS`
20 for SUBDIR in $SUBDIRS; do
21 oe_runmake -C $SUBDIR "DESTDIR=${INSTALL_DESTDIR}" install
22 CATEGORY=`ls -1 ${INSTALL_PLUGINSDIR} | head -n1 | tr '[:upper:]' '[:lower:]'`
23 NAME=`echo $SUBDIR | tr '[:upper:]' '[:lower:]'`
24 PKG="enigma2-plugin-$CATEGORY-$NAME"
25 rm -rf ${INSTALL_METADIR} ${INSTALL_PODIR} ${INSTALL_PLUGINSDIR}
26 find ${INSTALL_DESTDIR} -type f -name "*.la" -delete
27 find ${INSTALL_DESTDIR} -type f -fprintf ${INSTALL_ROOTDIR}/$PKG '/%P\n'
28 [ -s ${INSTALL_ROOTDIR}/$PKG ] || rm ${INSTALL_ROOTDIR}/$PKG
29 rm -rf ${INSTALL_DESTDIR}
32 # delete unwanted files
33 find ${D} -type f -name "*.la" -delete
36 PACKAGES_DYNAMIC = "^enigma2-plugin-(extensions|skincomponents|systemplugins)-.*"
37 PACKAGES += "${PN}-meta ${PN}-po"
40 FILES_${PN}-meta = "${datadir}/meta"
41 FILES_${PN}-po = "${datadir}/enigma2/po"
43 python enigma2_plugins_split_packages() {
44 enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
45 do_split_packages(d, enigma2_plugindir, '^(\w+/\w+)', 'enigma2-plugin-%s', '%s', recursive=True, extra_depends='enigma2', match_path=True)
47 def parseControlFile(package, dir):
48 filename = os.path.join(dir, 'CONTROL/control')
49 if os.path.exists(filename):
50 with open(filename) as f:
51 for line in f.read().splitlines():
53 name, value = line.strip().split(': ', 1)
54 if name == 'Description':
55 d.setVar('DESCRIPTION_%s' % package, value)
56 elif name in ('Breaks', 'Conflicts', 'Depends', 'Provides', 'Recommends', 'Replaces', 'Suggests'):
57 d.appendVar('R%s_%s' % (name.upper(), package), ' ' + ' '.join(value.split(', ')))
59 bb.fatal("Error parsing control file for package %s" % package)
61 def parseFileList(package, dir):
62 filename = os.path.join(dir, package)
63 if os.path.exists(filename):
64 varname = 'FILES_%s' % package
65 files = (d.getVar(varname, True) or "").split()
66 with open(filename) as f:
67 for line in f.read().splitlines():
70 d.setVar(varname, ' '.join(files))
72 tempdir = d.getVar('INSTALL_ROOTDIR', True)
73 srcdir = d.getVar('S', True)
74 packages = d.getVar('PACKAGES', True).split()
75 for package in packages:
76 if package.startswith('enigma2-plugin-'):
77 subdir = package.split('-')[-1]
78 parseFileList(package, tempdir)
79 parseControlFile(package, os.path.join(srcdir, subdir))
82 PACKAGESPLITFUNCS_prepend = "enigma2_plugins_split_packages "
84 INSTALL_ROOTDIR = "${WORKDIR}/${PN}-packaging-tempdir"
85 INSTALL_DESTDIR = "${INSTALL_ROOTDIR}/destdir"
86 INSTALL_METADIR = "${INSTALL_DESTDIR}${datadir}/meta"
87 INSTALL_PODIR = "${INSTALL_DESTDIR}${datadir}/enigma2/po"
88 INSTALL_PLUGINSDIR = "${INSTALL_DESTDIR}${libdir}/enigma2/python/Plugins"
90 # This list of packages is compiled from all 'Depends' fields in all control
91 # files found in the enigma2-plugins repository. If a dependency gets added
92 # there, add it here, too. This allows to keep build dependencies minimal
93 # while making sure that all runtime dependencies are available.
94 # As ${PN} doesn't contain any files and ALLOW_EMPTY isn't set, this list
95 # actually has no impact on any generated packages.
104 enigma2-streamproxy \
105 gstreamer1.0-plugins-bad-faad \
106 gstreamer1.0-plugins-bad-fragmented \
107 gstreamer1.0-plugins-good-flv \
108 gstreamer1.0-plugins-good-icydemux \
109 gstreamer1.0-plugins-good-spectrum \
119 python-google-api-client \
137 python-transmissionrpc \
138 python-twisted-core \
139 python-twisted-mail \
140 python-twisted-names \
141 python-twisted-protocols \