blob: 680f558fabc5816f07a423b903cdf42dd226b122 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001DESCRIPTION = "LCDproc is a client/server suite to drive all kinds of LCD (-like) devices. The client \
2shipped with this package can be used to acquire various kinds of system stats."
3SUMMARY = "Drivers for character-based LCD displays"
4HOMEPAGE = "http://lcdproc.org"
5SECTION = "utils"
6LICENSE = "GPLv2+"
7DEPENDS = "ncurses lirc"
8
9LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \
10 file://README;beginline=60;md5=637e042cdd3671ba00e78b58ede45d3b"
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/lcdproc/${BP}.tar.gz"
13
14inherit autotools update-rc.d
15
16LCD_DRIVERS ?= "all"
17LCD_DEFAULT_DRIVER ?= "curses"
18
19PACKAGECONFIG ??= "usb"
20PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0"
21PACKAGECONFIG[ftdi] = "--enable-libftdi,--disable-libftdi,libftdi"
22
23EXTRA_OECONF = "--enable-drivers=${LCD_DRIVERS}"
24
25do_install () {
26 # binaries
27 install -D -m 0755 server/LCDd ${D}${sbindir}/LCDd
28 install -D -m 0755 clients/lcdproc/lcdproc ${D}${bindir}/lcdproc
29
30 # init scripts
31 install -d ${D}${sysconfdir}/init.d
32 # so far, not fixed :-( and now even uglier :-((
33 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
34 chmod 0755 ${D}${sysconfdir}/init.d/lcdd
35 install -m 0755 scripts/init-lcdproc.debian ${D}${sysconfdir}/init.d/lcdproc
36 sed -i s'/--oknodo//' ${D}${sysconfdir}/init.d/lcdproc
37
38 # configuration files
39 install -m 0644 ${S}/LCDd.conf ${D}${sysconfdir}/LCDd.conf
40 sed -i 's!^DriverPath=.*!DriverPath=${libdir}/lcdproc/!' ${D}${sysconfdir}/LCDd.conf
41 sed -i 's!^Driver=.*!Driver=${LCD_DEFAULT_DRIVER}!' ${D}${sysconfdir}/LCDd.conf
42 install -m 0644 ${S}/clients/lcdproc/lcdproc.conf ${D}${sysconfdir}/lcdproc.conf
43
44 # driver library files
45 install -d ${D}${libdir}/lcdproc
46 for i in server/drivers/*.so; do
47 install -m 0644 $i ${D}${libdir}/lcdproc/
48 done
49}
50
51PACKAGES =+ "lcdd"
52
53RRECOMMENDS_${PN} = "lcdd"
54
55FILES_lcdd = "${sysconfdir}/LCDd.conf \
56 ${sbindir}/LCDd \
57 ${sysconfdir}/init.d/lcdd"
58
59CONFFILES_lcdd = "${sysconfdir}/LCDd.conf"
60CONFFILES_${PN} = "${sysconfdir}/lcdproc.conf"
61
62# Driver packages
63
64# USB / no USB trickery
65
66RCONFLICTS_lcdd-driver-hd47780nousb = "lcdd-driver-hd44780"
67RCONFLICTS_lcdd-driver-hd47780 = "lcdd-driver-hd44780nousb"
68
69INITSCRIPT_PACKAGES = "lcdd lcdproc"
70INITSCRIPT_NAME_lcdd = "lcdd"
71INITSCRIPT_NAME_lcdproc = "lcdproc"
72INITSCRIPT_PARAMS_lcdd = "defaults 70 21"
73INITSCRIPT_PARAMS_lcdproc = "defaults 71 20"
74
75python populate_packages_prepend() {
76 plugindir = d.expand('${libdir}/lcdproc')
77 do_split_packages(d, plugindir, '(.*)\.so$', 'lcdd-driver-%s', 'LCDd driver for %s', prepend=True)
78}
79
80PACKAGES_DYNAMIC += "^lcdd-driver-.*"
81