blob: 93a09f28a07d8c7484c1564405df154a4ca88003 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -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.md;beginline=107;md5=5c927ce1742d6d5cddc45b7ad6230f75"
11
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012BASEPV = "0.5.9"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013PV = "${BASEPV}+git${SRCPV}"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014SRCREV = "a4b5a7e058fdd0d914a61138748b589c0128b45b"
15SRC_URI = "git://github.com/lcdproc/lcdproc \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050016 "
17
18S = "${WORKDIR}/git"
19
20inherit autotools pkgconfig update-rc.d
21
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080022COMPATIBLE_HOST_arm_libc-musl = "null"
23
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024LCD_DRIVERS ?= "all,!irman,!svga"
25LCD_DEFAULT_DRIVER ?= "curses"
26
27PACKAGECONFIG ??= "usb"
28PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0"
29PACKAGECONFIG[ftdi] = "--enable-libftdi,--disable-libftdi,libftdi"
30PACKAGECONFIG[g15] = ",,libg15 g15daemon libg15render,"
31PACKAGECONFIG[hid] = "--enable-libhid,--disable-libhid,libhid"
32PACKAGECONFIG[png] = "--enable-libpng,--disable-libpng,libpng"
33
34LCD_DRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'g15', '', ',!g15', d)}"
35
36EXTRA_OECONF = "--enable-drivers='${LCD_DRIVERS}'"
37
38do_install () {
39 # binaries
40 install -D -m 0755 server/LCDd ${D}${sbindir}/LCDd
41 install -D -m 0755 clients/lcdproc/lcdproc ${D}${bindir}/lcdproc
42
43 # init scripts
44 install -d ${D}${sysconfdir}/init.d
45 # so far, not fixed :-( and now even uglier :-((
46 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
47 chmod 0755 ${D}${sysconfdir}/init.d/lcdd
48 install -m 0755 scripts/init-lcdproc.debian ${D}${sysconfdir}/init.d/lcdproc
49 sed -i s'/--oknodo//' ${D}${sysconfdir}/init.d/lcdproc
50
51 # configuration files
52 install -m 0644 ${S}/LCDd.conf ${D}${sysconfdir}/LCDd.conf
53 sed -i 's!^DriverPath=.*!DriverPath=${libdir}/lcdproc/!' ${D}${sysconfdir}/LCDd.conf
54 sed -i 's!^Driver=.*!Driver=${LCD_DEFAULT_DRIVER}!' ${D}${sysconfdir}/LCDd.conf
55 install -m 0644 ${S}/clients/lcdproc/lcdproc.conf ${D}${sysconfdir}/lcdproc.conf
56
57 # driver library files
58 install -d ${D}${libdir}/lcdproc
59 for i in server/drivers/*.so; do
60 install -m 0644 $i ${D}${libdir}/lcdproc/
61 done
62 # binaries
63 install -D -m 0755 clients/lcdvc/lcdvc ${D}${sbindir}/lcdvc
64
65 # configuration files
66 install -D -m 0644 ${S}/clients/lcdvc/lcdvc.conf ${D}${sysconfdir}/lcdvc.conf
67}
68
69PACKAGES =+ "lcdd lcdvc"
70
71RRECOMMENDS_${PN} = "lcdd"
72
73FILES_lcdd = "${sysconfdir}/LCDd.conf \
74 ${sbindir}/LCDd \
75 ${sysconfdir}/init.d/lcdd"
76
77CONFFILES_lcdd = "${sysconfdir}/LCDd.conf"
78CONFFILES_${PN} = "${sysconfdir}/lcdproc.conf"
79CONFFILES_lcdvc = "${sysconfdir}/lcdvc.conf"
80FILES_lcdvc = "${sysconfdir}/lcdvc.conf ${sbindir}/lcdvc"
81
82# Driver packages
83
84# USB / no USB trickery
85
86RCONFLICTS_lcdd-driver-hd47780nousb = "lcdd-driver-hd44780"
87RCONFLICTS_lcdd-driver-hd47780 = "lcdd-driver-hd44780nousb"
88
89INITSCRIPT_PACKAGES = "lcdd lcdproc"
90INITSCRIPT_NAME_lcdd = "lcdd"
91INITSCRIPT_NAME_lcdproc = "lcdproc"
92INITSCRIPT_PARAMS_lcdd = "defaults 70 21"
93INITSCRIPT_PARAMS_lcdproc = "defaults 71 20"
94
95python populate_packages_prepend() {
96 plugindir = d.expand('${libdir}/lcdproc')
97 do_split_packages(d, plugindir, '(.*)\.so$', 'lcdd-driver-%s', 'LCDd driver for %s', prepend=True)
98}
99
100PACKAGES_DYNAMIC += "^lcdd-driver-.*"