| Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -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;beginline=60;md5=637e042cdd3671ba00e78b58ede45d3b" | 
|  | 11 |  | 
|  | 12 | SRC_URI = "${SOURCEFORGE_MIRROR}/lcdproc/${BP}.tar.gz" | 
|  | 13 |  | 
|  | 14 | inherit autotools update-rc.d | 
|  | 15 |  | 
|  | 16 | LCD_DRIVERS ?= "all" | 
|  | 17 | LCD_DEFAULT_DRIVER ?= "curses" | 
|  | 18 |  | 
|  | 19 | PACKAGECONFIG ??= "usb" | 
|  | 20 | PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0" | 
|  | 21 | PACKAGECONFIG[ftdi] = "--enable-libftdi,--disable-libftdi,libftdi" | 
|  | 22 |  | 
|  | 23 | EXTRA_OECONF = "--enable-drivers=${LCD_DRIVERS}" | 
|  | 24 |  | 
|  | 25 | do_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 |  | 
|  | 51 | PACKAGES =+ "lcdd" | 
|  | 52 |  | 
|  | 53 | RRECOMMENDS_${PN} = "lcdd" | 
|  | 54 |  | 
|  | 55 | FILES_lcdd = "${sysconfdir}/LCDd.conf \ | 
|  | 56 | ${sbindir}/LCDd \ | 
|  | 57 | ${sysconfdir}/init.d/lcdd" | 
|  | 58 |  | 
|  | 59 | CONFFILES_lcdd = "${sysconfdir}/LCDd.conf" | 
|  | 60 | CONFFILES_${PN} = "${sysconfdir}/lcdproc.conf" | 
|  | 61 |  | 
|  | 62 | # Driver packages | 
|  | 63 |  | 
|  | 64 | # USB / no USB trickery | 
|  | 65 |  | 
|  | 66 | RCONFLICTS_lcdd-driver-hd47780nousb = "lcdd-driver-hd44780" | 
|  | 67 | RCONFLICTS_lcdd-driver-hd47780 = "lcdd-driver-hd44780nousb" | 
|  | 68 |  | 
|  | 69 | INITSCRIPT_PACKAGES = "lcdd lcdproc" | 
|  | 70 | INITSCRIPT_NAME_lcdd = "lcdd" | 
|  | 71 | INITSCRIPT_NAME_lcdproc = "lcdproc" | 
|  | 72 | INITSCRIPT_PARAMS_lcdd = "defaults 70 21" | 
|  | 73 | INITSCRIPT_PARAMS_lcdproc = "defaults 71 20" | 
|  | 74 |  | 
|  | 75 | python 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 |  | 
|  | 80 | PACKAGES_DYNAMIC += "^lcdd-driver-.*" | 
|  | 81 |  |