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