Support Uno4kSE
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-vuplus / e2openplugins / enigma2-plugin-extensions-openwebif.bb
1 MODULE = "OpenWebif"
2 DESCRIPTION = "Control your receiver with a browser"
3 LICENSE = "GPLv2"
4 LIC_FILES_CHKSUM = "file://README;firstline=10;lastline=12;md5=9c14f792d0aeb54e15490a28c89087f7"
5
6 DEPENDS = "python-cheetah-native"
7 RDEPENDS_${PN} = "python-cheetah python-json python-unixadmin python-misc python-pyopenssl \
8                 python-shell aio-grab python-compression python-numbers python-zopeinterface \
9 "
10
11 SRCREV_pn-${PN}="d84307958746e6a597b43defe5bd1cb78fd745c8"
12 inherit gitpkgv
13 PV = "1+git${SRCPV}"
14 PKGV = "1+git${GITPKGV}"
15 PR = "r5"
16
17 require openplugins-distutils.inc
18
19 SRC_URI += " file://openwebif_support_vumodels.patch"
20 SRC_URI += " file://openwebif_block_in_qpip.patch"
21
22 # Just a quick hack to "compile" it
23 do_compile() {
24         cheetah-compile -R --nobackup ${S}/plugin
25         python -O -m compileall ${S}
26 }
27
28 PLUGINPATH = "/usr/lib/enigma2/python/Plugins/Extensions/${MODULE}"
29 do_install_append() {
30         install -d ${D}${PLUGINPATH}
31         cp -rp ${S}/plugin/* ${D}${PLUGINPATH}
32 }
33
34 python do_package_prepend () {
35   boxtypes = [
36   ('bm750', 'duo.jpg', 'vu_normal.png'),
37   ('vuduo2', 'duo2.jpg', 'vu_duo2.png'),
38   ('vusolo', 'solo.jpg', 'vu_normal.png'),
39   ('vusolo2', 'solo2.jpg', 'vu_normal.png'),
40   ('vusolose', 'solose.jpg', 'vu_normal.png'),
41   ('vuzero', 'zero.jpg', 'vu_normal.png'),
42   ('vuultimo', 'ultimo.jpg', 'vu_ultimo.png'),
43   ('vuuno', 'uno.jpg', 'vu_normal.png'),
44   ('vuultimo4k', 'unknown.jpg', 'vu_normal.png'),
45   ('vuuno4k', 'unknown.jpg', 'vu_normal.png'),
46   ('vuuno4kse', 'unknown.jpg', 'vu_normal.png'),
47   ]
48   import os
49   top = '${D}${PLUGINPATH}/public/images/'
50   target_box = 'unknown.jpg'
51   target_remote = 'ow_remote.png'
52   for x in boxtypes:
53     if x[0] == '${MACHINE}':
54       target_box = x[1]
55       target_remote = x[2]
56       break
57   for root, dirs, files in os.walk(top + 'boxes', topdown=False):
58     for name in files:
59       if target_box != name and name != 'unknown.jpg':
60         os.remove(os.path.join(root, name))
61   for root, dirs, files in os.walk(top + 'remotes', topdown=False):
62     for name in files:
63       if target_remote != name and name != 'ow_remote.png':
64         os.remove(os.path.join(root, name))
65 }
66
67 FILES_${PN} = "${PLUGINPATH}"
68
69 do_populate_sysroot[noexec] = "1"
70