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