Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | DESCRIPTION = "LCDproc is a client/server suite to drive all kinds of LCD (-like) devices. The client \ |
| 2 | shipped with this package can be used to acquire various kinds of system stats." |
| 3 | SUMMARY = "Drivers for character-based LCD displays" |
| 4 | HOMEPAGE = "http://lcdproc.org" |
| 5 | SECTION = "utils" |
| 6 | LICENSE = "GPLv2+" |
| 7 | DEPENDS = "ncurses lirc" |
| 8 | |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \ |
| 10 | file://README.md;beginline=107;md5=5c927ce1742d6d5cddc45b7ad6230f75" |
| 11 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 12 | BASEPV = "0.5.9" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 13 | PV = "${BASEPV}+git${SRCPV}" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 14 | SRCREV = "a4b5a7e058fdd0d914a61138748b589c0128b45b" |
| 15 | SRC_URI = "git://github.com/lcdproc/lcdproc \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 16 | " |
| 17 | |
| 18 | S = "${WORKDIR}/git" |
| 19 | |
| 20 | inherit autotools pkgconfig update-rc.d |
| 21 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 22 | COMPATIBLE_HOST_arm_libc-musl = "null" |
| 23 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 24 | LCD_DRIVERS ?= "all,!irman,!svga" |
| 25 | LCD_DEFAULT_DRIVER ?= "curses" |
| 26 | |
| 27 | PACKAGECONFIG ??= "usb" |
| 28 | PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0" |
| 29 | PACKAGECONFIG[ftdi] = "--enable-libftdi,--disable-libftdi,libftdi" |
| 30 | PACKAGECONFIG[g15] = ",,libg15 g15daemon libg15render," |
| 31 | PACKAGECONFIG[hid] = "--enable-libhid,--disable-libhid,libhid" |
| 32 | PACKAGECONFIG[png] = "--enable-libpng,--disable-libpng,libpng" |
| 33 | |
| 34 | LCD_DRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'g15', '', ',!g15', d)}" |
| 35 | |
| 36 | EXTRA_OECONF = "--enable-drivers='${LCD_DRIVERS}'" |
| 37 | |
| 38 | do_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 | |
| 69 | PACKAGES =+ "lcdd lcdvc" |
| 70 | |
| 71 | RRECOMMENDS_${PN} = "lcdd" |
| 72 | |
| 73 | FILES_lcdd = "${sysconfdir}/LCDd.conf \ |
| 74 | ${sbindir}/LCDd \ |
| 75 | ${sysconfdir}/init.d/lcdd" |
| 76 | |
| 77 | CONFFILES_lcdd = "${sysconfdir}/LCDd.conf" |
| 78 | CONFFILES_${PN} = "${sysconfdir}/lcdproc.conf" |
| 79 | CONFFILES_lcdvc = "${sysconfdir}/lcdvc.conf" |
| 80 | FILES_lcdvc = "${sysconfdir}/lcdvc.conf ${sbindir}/lcdvc" |
| 81 | |
| 82 | # Driver packages |
| 83 | |
| 84 | # USB / no USB trickery |
| 85 | |
| 86 | RCONFLICTS_lcdd-driver-hd47780nousb = "lcdd-driver-hd44780" |
| 87 | RCONFLICTS_lcdd-driver-hd47780 = "lcdd-driver-hd44780nousb" |
| 88 | |
| 89 | INITSCRIPT_PACKAGES = "lcdd lcdproc" |
| 90 | INITSCRIPT_NAME_lcdd = "lcdd" |
| 91 | INITSCRIPT_NAME_lcdproc = "lcdproc" |
| 92 | INITSCRIPT_PARAMS_lcdd = "defaults 70 21" |
| 93 | INITSCRIPT_PARAMS_lcdproc = "defaults 71 20" |
| 94 | |
| 95 | python 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 | |
| 100 | PACKAGES_DYNAMIC += "^lcdd-driver-.*" |