[crashreport] import plugin.
[vuplus_openembedded] / recipes / lcdproc / lcdproc_cvs.bb
1 DESCRIPTION = "LCDproc is a client/Server suite to drive all kinds of LCD (-like) devices."
2 DESCRIPTION_append_lcdproc = " The client shipped with this package can be used to acquire various kinds of system stats."
3 DESCRIPTION_append_lcdd = " This package contains the LCDd server."
4 HOMEPAGE = "http://lcdproc.org"
5 LICENSE = "GPL"
6 PRIORITY = "optional"
7 SECTION = "utils"
8 PV = "0.4.99+cvs${SRCDATE}"
9
10 DEFAULT_PREFERENCE = "-1"
11
12 DEPENDS = "${@((bb.data.getVar('LCDPROC_DRIVERS',d) or 'curses,text').find('curses') != -1) and 'ncurses' or ''}"
13 RRECOMMENDS_lcdproc = "lcdd"
14
15 SRC_URI = "cvs://anonymous@lcdproc.cvs.sourceforge.net/cvsroot/lcdproc;module=lcdproc"
16 S = "${WORKDIR}/lcdproc"
17
18 inherit autotools update-rc.d
19
20 PACKAGES =+ "lcdd"
21
22 CONFFILES_lcdd = "${sysconfdir}/LCDd.conf"
23 CONFFILES_lcdproc = "${sysconfdir}/lcdproc.conf"
24
25 FILES_lcdd = "${CONFFILES_lcdd} \
26         ${sbindir}/LCDd \
27         ${sysconfdir}/init.d/lcdd \
28         ${libdir}/lcdproc/"
29 FILES_lcdproc = "${CONFFILES_lcdproc} \
30         ${bindir}/lcdproc \
31         ${sysconfdir}/init.d/lcdproc"
32
33 INITSCRIPT_PACKAGES = "lcdd lcdproc"
34 INITSCRIPT_NAME_lcdd = "lcdd"
35 INITSCRIPT_NAME_lcdproc = "lcdproc"
36 INITSCRIPT_PARAMS_lcdd = "defaults 70 21"
37 INITSCRIPT_PARAMS_lcdproc = "defaults 71 20"
38
39 EXTRA_OECONF = "${@'--enable-drivers=' + (bb.data.getVar('LCDPROC_DRIVERS',d) or 'curses,text')}"
40
41 do_install () {
42         # binaries
43         install -D -m 0755 server/LCDd ${D}${sbindir}/LCDd
44         install -D -m 0755 clients/lcdproc/lcdproc ${D}${bindir}/lcdproc
45
46         # init scripts
47         install -d ${D}${sysconfdir}/init.d
48         # so far, not fixed :-( and now even uglier :-((
49         cat scripts/init-LCDd.debian | sed -e s'/--oknodo//' -e 's/ -s -f / -s 1 -f 1 /' -e 's/force-reload/force-restart/' -e 's/sleep 1/sleep 4/' > ${D}${sysconfdir}/init.d/lcdd
50         chmod 0755 ${D}${sysconfdir}/init.d/lcdd
51         # prevent lcdproc from starting if no SCREENS are set.
52         # will be fixed in next upstream release
53         cat scripts/init-lcdproc.debian | sed -e 's/C X//' | sed -e 's/case/[ -n "$SCREENS" ] || exit 0\n\ncase/' | sed -e s'/--oknodo//' > ${D}${sysconfdir}/init.d/lcdproc
54         chmod 0755 ${D}${sysconfdir}/init.d/lcdproc
55
56         # configuration files
57         install -D -m 0644 LCDd.conf ${D}${sysconfdir}/LCDd.conf
58         # don't start lcdproc by default
59         # will be fixed in next upstream release
60         cat scripts/lcdproc.conf | sed -e 's/C X//' > ${D}${sysconfdir}/lcdproc.conf
61         chmod 0644 ${D}${sysconfdir}/lcdproc.conf
62
63         # driver library files
64         install -d ${D}${libdir}/lcdproc
65         for i in server/drivers/*.so; do
66                 install -m 0644 $i ${D}${libdir}/lcdproc/
67         done
68 }
69