dreambox-bootlogo: allow DVI again for dm800,dm8000,dm800se,dm500hd
[openembedded.git] / recipes / dreambox / dreambox-bootlogo.bb
1 DESCRIPTION = "Bootlogo support"
2 SECTION = "base"
3 PRIORITY = "required"
4 LICENSE = "proprietary"
5 MAINTAINER = "Felix Domke <tmbinc@elitedvb.net>"
6
7 BINARY_VERSION = "1"
8 BINARY_VERSION_mipsel = "10"
9 BINARY_VERSION_dm7025 = "8"
10
11 IMAGES_VERSION = "1"
12 IMAGES_VERSION_dm500hd = "2"
13 IMAGES_VERSION_dm800se = "2"
14 IMAGES_VERSION_dm7020hd= "2"
15 IMAGES_VERSION_dm8000 = "2"
16
17 PV = "${BINARY_VERSION}.${IMAGES_VERSION}"
18 PR = "r4"
19
20 SRC_URI = "http://sources.dreamboxupdate.com/download/7020/bootlogo-${MACHINE}-${BINARY_VERSION}.elf \
21         http://sources.dreamboxupdate.com/download/7020/bootlogo-${MACHINE}-${IMAGES_VERSION}.mvi \
22         http://sources.dreamboxupdate.com/download/7020/bootlogo_wait-${MACHINE}-${IMAGES_VERSION}.mvi \
23         http://sources.dreamboxupdate.com/download/7020/backdrop-${MACHINE}-${IMAGES_VERSION}.mvi"
24
25 SRC_URI_append_dm8000 = " http://sources.dreamboxupdate.com/download/7020/bootlogo-${MACHINE}-${IMAGES_VERSION}.jpg"
26 SRC_URI_append_dm500hd = " http://sources.dreamboxupdate.com/download/7020/bootlogo-${MACHINE}-${IMAGES_VERSION}.jpg"
27 SRC_URI_append_dm800se = " http://sources.dreamboxupdate.com/download/7020/bootlogo-${MACHINE}-${IMAGES_VERSION}.jpg"
28 SRC_URI_append_dm7020hd = " http://sources.dreamboxupdate.com/download/7020/bootlogo-${MACHINE}-${IMAGES_VERSION}.jpg"
29 SRC_URI_append_dm800 = " http://sources.dreamboxupdate.com/download/7020/bootlogo-${MACHINE}-${IMAGES_VERSION}.jpg \
30         http://sources.dreamboxupdate.com/download/7020/switchoff-${MACHINE}-${IMAGES_VERSION}.mvi"
31
32 S = "${WORKDIR}/"
33
34 MVI = "bootlogo backdrop bootlogo_wait"
35 MVI_append_dm800 = " switchoff"
36
37 do_install() {
38         install -d ${D}/boot
39         install -m 0755 ${S}/bootlogo-${MACHINE}-${BINARY_VERSION}.elf ${D}/boot/bootlogo.elf
40         for i in ${MVI}; do
41                 install -m 0755 ${S}/$i-${MACHINE}-${IMAGES_VERSION}.mvi ${D}/boot/$i.mvi;
42         done;
43 }
44
45 do_install_dm800() {
46         install -d ${D}/boot
47         install -d ${D}/usr/share
48         install -m 0755 ${S}/bootlogo-${MACHINE}-${BINARY_VERSION}.elf ${D}/boot/bootlogo.elf
49         install -m 0755 ${S}/bootlogo-${MACHINE}-${IMAGES_VERSION}.jpg ${D}/boot/bootlogo.jpg
50         for i in ${MVI}; do
51                 install -m 0755 ${S}/$i-${MACHINE}-${IMAGES_VERSION}.mvi ${D}/usr/share/$i.mvi;
52                 ln -sf /usr/share/$i.mvi ${D}/boot/$i.mvi;
53         done;
54 }
55
56 do_install_dm500hd() {
57         do_install_dm800
58 }
59
60 do_install_dm800se() {
61         do_install_dm800
62 }
63
64 do_install_dm7020hd() {
65         do_install_dm800
66 }
67
68 do_install_dm8000() {
69         do_install_dm800
70 }
71
72 pkg_preinst() {
73         [ -d /proc/stb ] && mount -o rw,remount /boot
74 }
75
76 pkg_postinst() {
77         [ -d /proc/stb ] && mount -o ro,remount /boot
78 }
79
80 pkg_prerm() {
81         [ -d /proc/stb ] && mount -o rw,remount /boot
82 }
83
84 pkg_postrm() {
85         [ -d /proc/stb ] && mount -o ro,remount /boot
86 }
87
88 PACKAGE_ARCH := "${MACHINE_ARCH}"
89 FILES_${PN} = "/boot /usr/share"