opera hbbtv.
[vuplus_openembedded] / recipes / lcdproc / lcdproc_0.4.5.bb
1 DESCRIPTION = "LCDproc is a client/Server suite to drive all kinds of LCD (-like) devices. The client \
2 shipped with this package can be used to acquire various kinds of system stats."
3 HOMEPAGE = "http://lcdproc.org"
4 LICENSE ="GPL"
5 PRIORITY = "optional"
6 SECTION = "utils"
7
8 DEPENDS = "${@((bb.data.getVar('LCDPROC_DRIVERS',d) or 'curses,text').find('curses') != -1) and 'ncurses' or ''}"
9
10 SRC_URI = "${SOURCEFORGE_MIRROR}/lcdproc/lcdproc-${PV}.tar.gz"
11
12 inherit autotools
13
14 EXTRA_OECONF = "${@'--enable-drivers=' + (bb.data.getVar('LCDPROC_DRIVERS',d) or 'curses,text')}"
15
16 do_install () {
17         # binaries
18         install -D -m 0755 server/LCDd ${D}${sbindir}/LCDd
19         install -D -m 0755 clients/lcdproc/lcdproc ${D}${bindir}/lcdproc
20
21         # init scripts
22         install -D -m 0755 scripts/init-LCDd.debian ${D}${sysconfdir}/init.d/lcdd
23         # prevent lcdproc from starting if no SCREENS are set.
24         # will be fixed in next upstream release
25         cat scripts/init-lcdproc.debian | sed -e 's/C X//' | sed -e 's/case/[ -n $SCREENS ] || exit 0\n\ncase/' > ${D}${sysconfdir}/init.d/lcdproc
26         chmod 0755 ${D}${sysconfdir}/init.d/lcdproc
27
28         # configuration files
29         install -D -m 0644 LCDd.conf ${D}${sysconfdir}/LCDd.conf
30         # don't start lcdproc by default
31         # will be fixed in next upstream release
32         cat scripts/lcdproc.conf | sed -e 's/C X//' > ${D}${sysconfdir}/lcdproc.conf
33         chmod 0644 ${D}${sysconfdir}/lcdproc.conf
34 }
35
36 pkg_postinst () {
37         if test -n "${D}"; then
38                 D="-r $D"
39         fi
40         update-rc.d $D lcdd defaults 70 21
41         update-rc.d $D lcdproc defaults 71 20
42 }
43
44 pkg_prerm () {
45         if test -n "${D}"; then
46                 D="-r $D"
47         fi
48         update-rc.d $D lcdproc remove
49         update-rc.d $D lcdd remove
50 }