b857a641acc20359fa8f3048a1b526acfbec6193
[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
16 require openplugins-distutils.inc
17
18 # Just a quick hack to "compile" it
19 do_compile() {
20         cheetah-compile -R --nobackup ${S}/plugin
21         python -O -m compileall ${S}
22 }
23
24 PLUGINPATH = "/usr/lib/enigma2/python/Plugins/Extensions/${MODULE}"
25 do_install_append() {
26         install -d ${D}${PLUGINPATH}
27         cp -rp ${S}/plugin/* ${D}${PLUGINPATH}
28 }
29
30 python do_package_prepend () {
31   boxtypes = [
32   ('bm750', 'duo.jpg', 'vu_normal.png'),
33   ('vuduo2', 'duo2.jpg', 'vu_duo2.png'),
34   ('vusolo', 'solo.jpg', 'vu_normal.png'),
35   ('vusolo2', 'solo2.jpg', 'vu_normal.png'),
36   ('vusolose', 'solose.jpg', 'vu_normal.png'),
37   ('vuzero', 'zero.jpg', 'vu_normal.png'),
38   ('vuultimo', 'ultimo.jpg', 'vu_ultimo.png'),
39   ('vuuno', 'uno.jpg', 'vu_normal.png'),
40   ]
41   import os
42   top = '${D}${PLUGINPATH}/public/images/'
43   target_box = 'unknown.jpg'
44   target_remote = 'ow_remote.png'
45   for x in boxtypes:
46     if x[0] == '${MACHINE}':
47       target_box = x[1]
48       target_remote = x[2]
49       break
50   for root, dirs, files in os.walk(top + 'boxes', topdown=False):
51     for name in files:
52       if target_box != name and name != 'unknown.jpg':
53         os.remove(os.path.join(root, name))
54   for root, dirs, files in os.walk(top + 'remotes', topdown=False):
55     for name in files:
56       if target_remote != name and name != 'ow_remote.png':
57         os.remove(os.path.join(root, name))
58 }
59
60 FILES_${PN} = "${PLUGINPATH}"