enigma2-plugins: remove unused python-daap
[opendreambox.git] / meta-opendreambox / recipes-dreambox / enigma2 / enigma2-plugins_4.3.0.bb
1 SUMMARY = "Additional plugins for Enigma2"
2 LICENSE = "Proprietary"
3 LIC_FILES_CHKSUM = "file://COPYING;md5=8e37f34d0e40d32ea2bc90ee812c9131"
4 DEPENDS = " \
5         dbttcd \
6         dvdbackup \
7         enigma2 \
8         hdparm \
9         python-flickrapi \
10         python-gdata \
11         python-google-api-client \
12         python-mutagen \
13         python-pycrypto \
14         python-pyopenssl \
15         python-transmissionrpc \
16         python-youtube-dl \
17         smartmontools \
18         streamripper \
19         satip-client \
20 "
21 SRCREV = "${@opendreambox_srcrev('e0a36c7ec1f85800249322eb92e9c4bb8bc370b5', d)}"
22
23 SRC_URI += "file://print.mak"
24
25 inherit autotools opendreambox-github pythonnative
26
27 export BUILD_SYS
28 export HOST_SYS
29 export STAGING_INCDIR
30 export STAGING_LIBDIR
31
32 do_install_append() {
33         # create lists of files installed outside of "${libdir}/enigma2/python/Plugins" or "${datadir}/meta"
34         rm -rf ${INSTALL_ROOTDIR}
35         install -d ${INSTALL_ROOTDIR}
36         SUBDIRS=`make -f Makefile -f ${WORKDIR}/print.mak print-SUBDIRS`
37         for SUBDIR in $SUBDIRS; do
38                 oe_runmake -C $SUBDIR "DESTDIR=${INSTALL_DESTDIR}" install
39                 CATEGORY=`ls -1 ${INSTALL_PLUGINSDIR} | head -n1 | tr '[:upper:]' '[:lower:]'`
40                 NAME=`echo $SUBDIR | tr '[:upper:]' '[:lower:]'`
41                 PKG="enigma2-plugin-$CATEGORY-$NAME"
42                 rm -rf ${INSTALL_METADIR} ${INSTALL_PODIR} ${INSTALL_PLUGINSDIR}
43                 find ${INSTALL_DESTDIR} -type f -name "*.la" -delete -fprintf ${INSTALL_ROOTDIR}/$PKG-dev '/%P\n'
44                 [ -s ${INSTALL_ROOTDIR}/$PKG-dev ] || rm ${INSTALL_ROOTDIR}/$PKG-dev
45                 find ${INSTALL_DESTDIR} -type f -name "*.a" -delete -fprintf ${INSTALL_ROOTDIR}/$PKG-staticdev '/%P\n'
46                 [ -s ${INSTALL_ROOTDIR}/$PKG-staticdev ] || rm ${INSTALL_ROOTDIR}/$PKG-staticdev
47                 find ${INSTALL_DESTDIR} -type f -fprintf ${INSTALL_ROOTDIR}/$PKG '/%P\n'
48                 [ -s ${INSTALL_ROOTDIR}/$PKG ] || rm ${INSTALL_ROOTDIR}/$PKG
49                 rm -rf ${INSTALL_DESTDIR}
50         done
51 }
52
53 PACKAGES_DYNAMIC = "enigma2-plugin-*"
54 PACKAGES += "${PN}-meta"
55 PACKAGES =+ "${PN}-po"
56
57 FILES_${PN} += "${datadir}/enigma2 ${datadir}/fonts"
58 FILES_${PN}-meta = "${datadir}/meta"
59 FILES_${PN}-po = "${datadir}/enigma2/po"
60
61 python populate_packages_prepend() {
62     enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
63     do_split_packages(d, enigma2_plugindir, '^(\w+/\w+)', 'enigma2-plugin-%s', '%s', recursive=True, match_path=True, prepend=True)
64     do_split_packages(d, enigma2_plugindir, '^(\w+/\w+).*/.*\.la$', 'enigma2-plugin-%s-dev', '%s (development)', recursive=True, match_path=True, prepend=True)
65     do_split_packages(d, enigma2_plugindir, '^(\w+/\w+).*/.*\.a$', 'enigma2-plugin-%s-staticdev', '%s (static development)', recursive=True, match_path=True, prepend=True)
66     do_split_packages(d, enigma2_plugindir, '^(\w+/\w+).*/\.debug/', 'enigma2-plugin-%s-dbg', '%s (debug)', recursive=True, match_path=True, prepend=True)
67     def parseControlFile(dir, d, package):
68         src = open(dir + "/" + package.split('-')[-1] + "/CONTROL/control").read()
69         for line in src.splitlines():
70             try:
71                 name, value = line.strip().split(': ', 1)
72                 if name == 'Description':
73                     d.setVar('DESCRIPTION_' + package, value)
74                 elif name == 'Depends':
75                     d.setVar('RDEPENDS_' + package, ' '.join(value.split(', ')))
76                 elif name == 'Replaces':
77                     d.setVar('RREPLACES_' + package, ' '.join(value.split(', ')))
78                 elif name == 'Conflicts':
79                     d.setVar('RCONFLICTS_' + package, ' '.join(value.split(', ')))
80             except:
81                 bb.fatal("Error parsing control file for package %s" % package)
82     def parseFileList(dir, d, package):
83         filename = os.path.join(dir, package)
84         if os.path.exists(filename):
85             varname = 'FILES_%s' % package
86             files = (d.getVar(varname, True) or "").split()
87             src = open(filename).read()
88             for line in src.splitlines():
89                 if not line in files:
90                     files.append(line)
91             d.setVar(varname, ' '.join(files))
92     tempdir = d.getVar('INSTALL_ROOTDIR', True)
93     srcdir = d.getVar('S', True)
94     for package in d.getVar('PACKAGES', True).split():
95         if package.startswith('enigma2-plugin-'):
96             parseFileList(tempdir, d, package)
97             if not package.endswith('-dev') and not package.endswith('-dbg') and not package.endswith('-staticdev'):
98                 parseControlFile(srcdir, d, package)
99 }
100
101 INSTALL_ROOTDIR = "${WORKDIR}/${PN}-packaging-tempdir"
102 INSTALL_DESTDIR = "${INSTALL_ROOTDIR}/destdir"
103 INSTALL_METADIR = "${INSTALL_DESTDIR}${datadir}/meta"
104 INSTALL_PODIR = "${INSTALL_DESTDIR}${datadir}/enigma2/po"
105 INSTALL_PLUGINSDIR = "${INSTALL_DESTDIR}${libdir}/enigma2/python/Plugins"
106
107 COMPATIBLE_MACHINE = "^(dm520|dm820|dm7080)$"