enigma2-hbbtv-plugin: add checksums for cortexa15hf-neon-vfpv4
[opendreambox.git] / meta-opendreambox / recipes-dreambox / enigma2 / enigma2-plugins.inc
1 SUMMARY = "Additional plugins for Enigma2"
2 LICENSE = "Proprietary"
3 LIC_FILES_CHKSUM = "file://COPYING;md5=8e37f34d0e40d32ea2bc90ee812c9131"
4 DEPENDS = "enigma2 gstreamer1.0 openssl"
5
6 SRC_URI += "file://print.mak"
7
8 inherit autotools-brokensep pkgconfig pythonnative
9
10 export BUILD_SYS
11 export HOST_SYS
12 export STAGING_INCDIR
13 export STAGING_LIBDIR
14
15 do_install_append() {
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}
30         done
31
32         # delete unwanted files
33         find ${D} -type f -name "*.la" -delete
34 }
35
36 PACKAGES_DYNAMIC = "^enigma2-plugin-(extensions|skincomponents|systemplugins)-.*"
37 PACKAGES += "${PN}-meta ${PN}-po"
38
39 FILES_${PN} = ""
40 FILES_${PN}-meta = "${datadir}/meta"
41 FILES_${PN}-po = "${datadir}/enigma2/po"
42
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)
46
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():
52                     try:
53                         name, value = line.strip().split(': ', 1)
54                         if name == 'Description':
55                             d.setVar('DESCRIPTION_%s' % package, value)
56                         elif name == 'Depends':
57                             d.appendVar('RDEPENDS_%s' % package, ' ' + ' '.join(value.split(', ')))
58                         elif name == 'Replaces':
59                             d.setVar('RREPLACES_%s' % package, ' '.join(value.split(', ')))
60                         elif name == 'Conflicts':
61                             d.setVar('RCONFLICTS_%s' % package, ' '.join(value.split(', ')))
62                     except:
63                         bb.fatal("Error parsing control file for package %s" % package)
64
65     def parseFileList(package, dir):
66         filename = os.path.join(dir, package)
67         if os.path.exists(filename):
68             varname = 'FILES_%s' % package
69             files = (d.getVar(varname, True) or "").split()
70             with open(filename) as f:
71                 for line in f.read().splitlines():
72                     if not line in files:
73                         files.append(line)
74             d.setVar(varname, ' '.join(files))
75
76     tempdir = d.getVar('INSTALL_ROOTDIR', True)
77     srcdir = d.getVar('S', True)
78     packages = d.getVar('PACKAGES', True).split()
79     for package in packages:
80         if package.startswith('enigma2-plugin-'):
81             subdir = package.split('-')[-1]
82             parseFileList(package, tempdir)
83             parseControlFile(package, os.path.join(srcdir, subdir))
84 }
85
86 PACKAGESPLITFUNCS_prepend = "enigma2_plugins_split_packages "
87
88 INSTALL_ROOTDIR = "${WORKDIR}/${PN}-packaging-tempdir"
89 INSTALL_DESTDIR = "${INSTALL_ROOTDIR}/destdir"
90 INSTALL_METADIR = "${INSTALL_DESTDIR}${datadir}/meta"
91 INSTALL_PODIR = "${INSTALL_DESTDIR}${datadir}/enigma2/po"
92 INSTALL_PLUGINSDIR = "${INSTALL_DESTDIR}${libdir}/enigma2/python/Plugins"
93
94 # This list of packages is compiled from all 'Depends' fields in all control
95 # files found in the enigma2-plugins repository. If a dependency gets added
96 # there, add it here, too. This allows to keep build dependencies minimal
97 # while making sure that all runtime dependencies are available.
98 # As ${PN} doesn't contain any files and ALLOW_EMPTY isn't set, this list
99 # actually has no impact on any generated packages.
100 RDEPENDS_${PN} = " \
101         aio-grab \
102         avahi-daemon \
103         cdrkit \
104         cdtextinfo \
105         dbttcd \
106         dvdbackup \
107         enigma2-streamproxy \
108         gstreamer1.0-plugins-bad-faad \
109         gstreamer1.0-plugins-bad-fragmented \
110         gstreamer1.0-plugins-good-flv \
111         gstreamer1.0-plugins-good-icydemux \
112         gstreamer1.0-plugins-good-spectrum \
113         hdparm \
114         parted \
115         python-codecs \
116         python-compression \
117         python-crypt \
118         python-difflib \
119         python-email \
120         python-flickrapi \
121         python-gdata \
122         python-google-api-client \
123         python-html \
124         python-io \
125         python-json \
126         python-lang \
127         python-misc \
128         python-mutagen \
129         python-netclient \
130         python-pycrypto \
131         python-pyopenssl \
132         python-re \
133         python-shell \
134         python-simplejson \
135         python-sqlite3 \
136         python-subprocess \
137         python-textutils \
138         python-threading \
139         python-transmissionrpc \
140         python-twisted-core \
141         python-twisted-mail \
142         python-twisted-names \
143         python-twisted-protocols \
144         python-twisted-web \
145         python-xml \
146         python-xmlrpc \
147         python-youtube-dl \
148         python-zlib \
149         satip-client \
150         smartmontools \
151         streamripper \
152 "