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