Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[openembedded.git] / recipes / lcdproc / lcdproc_0.4.99+cvs20060123.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
9 DEPENDS = "${@((bb.data.getVar('LCDPROC_DRIVERS',d) or 'curses,text').find('curses') != -1) and 'ncurses' or ''}"
10 RRECOMMENDS_lcdproc = "lcdd"
11
12 SRCDATE = "${@bb.data.getVar('FILE', d, 1).split('cvs')[-1].split('.')[0]}"
13 SRC_URI = "cvs://anonymous@lcdproc.cvs.sourceforge.net/cvsroot/lcdproc;module=lcdproc"
14 S = "${WORKDIR}/lcdproc"
15
16 inherit autotools update-rc.d
17
18 PACKAGES =+ "lcdd"
19
20 CONFFILES_lcdd = "${sysconfdir}/LCDd.conf"
21 CONFFILES_lcdproc = "${sysconfdir}/lcdproc.conf"
22
23 FILES_lcdd = "${CONFFILES_lcdd} \
24         ${sbindir}/LCDd \
25         ${sysconfdir}/init.d/lcdd \
26         ${libdir}/lcdproc/"
27 FILES_lcdproc = "${CONFFILES_lcdproc} \
28         ${bindir}/lcdproc \
29         ${sysconfdir}/init.d/lcdproc"
30
31 INITSCRIPT_PACKAGES = "lcdd lcdproc"
32 INITSCRIPT_NAME_lcdd = "lcdd"
33 INITSCRIPT_NAME_lcdproc = "lcdproc"
34 INITSCRIPT_PARAMS_lcdd = "defaults 70 21"
35 INITSCRIPT_PARAMS_lcdproc = "defaults 71 20"
36
37 EXTRA_OECONF = "${@'--enable-drivers=' + (bb.data.getVar('LCDPROC_DRIVERS',d) or 'curses,text')}"
38
39 do_install () {
40         # binaries
41         install -D -m 0755 server/LCDd ${D}${sbindir}/LCDd
42         install -D -m 0755 clients/lcdproc/lcdproc ${D}${bindir}/lcdproc
43
44         # init scripts
45         install -d ${D}${sysconfdir}/init.d
46         # so far, not fixed :-( and now even uglier :-((
47         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
48         chmod 0755 ${D}${sysconfdir}/init.d/lcdd
49         # prevent lcdproc from starting if no SCREENS are set.
50         # will be fixed in next upstream release
51         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
52         chmod 0755 ${D}${sysconfdir}/init.d/lcdproc
53
54         # configuration files
55         install -D -m 0644 LCDd.conf ${D}${sysconfdir}/LCDd.conf
56         # don't start lcdproc by default
57         # will be fixed in next upstream release
58         cat scripts/lcdproc.conf | sed -e 's/C X//' > ${D}${sysconfdir}/lcdproc.conf
59         chmod 0644 ${D}${sysconfdir}/lcdproc.conf
60
61         # driver library files
62         install -d ${D}${libdir}/lcdproc
63         for i in server/drivers/*.so; do
64                 install -m 0644 $i ${D}${libdir}/lcdproc/
65         done
66 }
67