blob: 7ddc55f5e72603c00124a5830261b9ab8f476c4e [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 Bishop34ae6002019-04-08 15:21:03 -040014SRCREV = "e08546c13a4157ed98cd4a8e9086e7acd66f93c0"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015SRC_URI = "git://github.com/lcdproc/lcdproc \
Brad Bishop34ae6002019-04-08 15:21:03 -040016 file://0001-Fix-parallel-build-fix-port-internal-make-dependenci.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050017 "
18
19S = "${WORKDIR}/git"
20
21inherit autotools pkgconfig update-rc.d
22
Brad Bishop6e60e8b2018-02-01 10:27:11 -050023LCD_DRIVERS ?= "all,!irman,!svga"
Brad Bishop19323692019-04-05 15:28:33 -040024LCD_DRIVERS_append_aarch64 = ",!serialVFD"
25LCD_DRIVERS_append_arm = ",!serialVFD"
26
Brad Bishop6e60e8b2018-02-01 10:27:11 -050027LCD_DEFAULT_DRIVER ?= "curses"
28
29PACKAGECONFIG ??= "usb"
30PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0"
31PACKAGECONFIG[ftdi] = "--enable-libftdi,--disable-libftdi,libftdi"
32PACKAGECONFIG[g15] = ",,libg15 g15daemon libg15render,"
33PACKAGECONFIG[hid] = "--enable-libhid,--disable-libhid,libhid"
34PACKAGECONFIG[png] = "--enable-libpng,--disable-libpng,libpng"
35
36LCD_DRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'g15', '', ',!g15', d)}"
37
38EXTRA_OECONF = "--enable-drivers='${LCD_DRIVERS}'"
39
40do_install () {
41 # binaries
42 install -D -m 0755 server/LCDd ${D}${sbindir}/LCDd
43 install -D -m 0755 clients/lcdproc/lcdproc ${D}${bindir}/lcdproc
44
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 install -m 0755 scripts/init-lcdproc.debian ${D}${sysconfdir}/init.d/lcdproc
51 sed -i s'/--oknodo//' ${D}${sysconfdir}/init.d/lcdproc
52
53 # configuration files
54 install -m 0644 ${S}/LCDd.conf ${D}${sysconfdir}/LCDd.conf
55 sed -i 's!^DriverPath=.*!DriverPath=${libdir}/lcdproc/!' ${D}${sysconfdir}/LCDd.conf
56 sed -i 's!^Driver=.*!Driver=${LCD_DEFAULT_DRIVER}!' ${D}${sysconfdir}/LCDd.conf
57 install -m 0644 ${S}/clients/lcdproc/lcdproc.conf ${D}${sysconfdir}/lcdproc.conf
58
59 # driver library files
60 install -d ${D}${libdir}/lcdproc
61 for i in server/drivers/*.so; do
62 install -m 0644 $i ${D}${libdir}/lcdproc/
63 done
64 # binaries
65 install -D -m 0755 clients/lcdvc/lcdvc ${D}${sbindir}/lcdvc
66
67 # configuration files
68 install -D -m 0644 ${S}/clients/lcdvc/lcdvc.conf ${D}${sysconfdir}/lcdvc.conf
69}
70
71PACKAGES =+ "lcdd lcdvc"
72
73RRECOMMENDS_${PN} = "lcdd"
74
75FILES_lcdd = "${sysconfdir}/LCDd.conf \
76 ${sbindir}/LCDd \
77 ${sysconfdir}/init.d/lcdd"
78
79CONFFILES_lcdd = "${sysconfdir}/LCDd.conf"
80CONFFILES_${PN} = "${sysconfdir}/lcdproc.conf"
81CONFFILES_lcdvc = "${sysconfdir}/lcdvc.conf"
82FILES_lcdvc = "${sysconfdir}/lcdvc.conf ${sbindir}/lcdvc"
83
84# Driver packages
85
86# USB / no USB trickery
87
88RCONFLICTS_lcdd-driver-hd47780nousb = "lcdd-driver-hd44780"
89RCONFLICTS_lcdd-driver-hd47780 = "lcdd-driver-hd44780nousb"
90
91INITSCRIPT_PACKAGES = "lcdd lcdproc"
92INITSCRIPT_NAME_lcdd = "lcdd"
93INITSCRIPT_NAME_lcdproc = "lcdproc"
94INITSCRIPT_PARAMS_lcdd = "defaults 70 21"
95INITSCRIPT_PARAMS_lcdproc = "defaults 71 20"
96
97python populate_packages_prepend() {
98 plugindir = d.expand('${libdir}/lcdproc')
99 do_split_packages(d, plugindir, '(.*)\.so$', 'lcdd-driver-%s', 'LCDd driver for %s', prepend=True)
100}
101
102PACKAGES_DYNAMIC += "^lcdd-driver-.*"