Patchwork [meta-oe] lcdproc: add recipe from OE-Classic and update/clean up

login
register
mail settings
Submitter Paul Eggleton
Date Oct. 7, 2012, 10:47 a.m.
Message ID <1349606858-7635-1-git-send-email-paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/37877/
State Accepted
Commit aee9bec6331c303d9a24351e1f8d5cf6b510ed7b
Headers show

Comments

Paul Eggleton - Oct. 7, 2012, 10:47 a.m.
* Update to latest upstream version 0.5.5
* Add an Ubuntu patch to fix incompatibility with current automake
* Use automatic package splitting for drivers
* Allow specifying drivers to build via LCD_DRIVERS
* Allow specifying default enabled driver via LCD_DEFAULT_DRIVER
* Disable g15 driver by default (but allow it to be re-enabled using
  PACKAGECONFIG, assuming the required recipes are also provided).
* Fix conf files not going into lcdvc and lcdd packages due to
  override expansion not happening at the expected time (for
  CONFFILES_*)
* Remove some unnecessary cruft
* Move packaging parts of recipe below do_install
* Add LIC_FILES_CHKSUM
* Make LICENSE more accurate
* Add SUMMARY

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 .../lcdproc/lcdproc/automake-111-fix.patch         |   21 ++++++
 meta-oe/recipes-extended/lcdproc/lcdproc5.inc      |   77 ++++++++++++++++++++
 meta-oe/recipes-extended/lcdproc/lcdproc_0.5.5.bb  |   24 ++++++
 3 files changed, 122 insertions(+)
 create mode 100644 meta-oe/recipes-extended/lcdproc/lcdproc/automake-111-fix.patch
 create mode 100644 meta-oe/recipes-extended/lcdproc/lcdproc5.inc
 create mode 100644 meta-oe/recipes-extended/lcdproc/lcdproc_0.5.5.bb
Koen Kooi - Oct. 9, 2012, 9 a.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 07-10-12 12:47, Paul Eggleton schreef:
> * Update to latest upstream version 0.5.5 * Add an Ubuntu patch to fix
> incompatibility with current automake * Use automatic package splitting
> for drivers * Allow specifying drivers to build via LCD_DRIVERS * Allow
> specifying default enabled driver via LCD_DEFAULT_DRIVER * Disable g15
> driver by default (but allow it to be re-enabled using PACKAGECONFIG,
> assuming the required recipes are also provided). * Fix conf files not
> going into lcdvc and lcdd packages due to override expansion not
> happening at the expected time (for CONFFILES_*) * Remove some
> unnecessary cruft * Move packaging parts of recipe below do_install * Add
> LIC_FILES_CHKSUM * Make LICENSE more accurate * Add SUMMARY
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>

[..]

> +# Driver packages + +# USB / no USB trickery + 
> +RCONFLICTS_lcdd-driver-hd47780nousb = "lcdd-driver-hd44780" 
> +RCONFLICTS_lcdd-driver-hd47780 = "lcdd-driver-hd44780nousb" + 
> +INITSCRIPT_PACKAGES = "lcdd lcdproc" +INITSCRIPT_NAME_lcdd = "lcdd" 
> +INITSCRIPT_NAME_lcdproc = "lcdproc" +INITSCRIPT_PARAMS_lcdd = "defaults
> 70 21" +INITSCRIPT_PARAMS_lcdproc = "defaults 71 20"

Those the stock initscript have LSB headers? They help a lot when using
systemd to work out dependencies in sysv-compat mode.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFQc+fHMkyGM64RGpERAozFAKCwqWsRCkx/3z15MXQsX732u3lBzACgqofA
wRA86yRkVOrVPS3i7ZQwDsk=
=3r5B
-----END PGP SIGNATURE-----
Paul Eggleton - Oct. 9, 2012, 9:26 a.m.
On Tuesday 09 October 2012 11:00:55 Koen Kooi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Op 07-10-12 12:47, Paul Eggleton schreef:
> > * Update to latest upstream version 0.5.5 * Add an Ubuntu patch to fix
> > incompatibility with current automake * Use automatic package splitting
> > for drivers * Allow specifying drivers to build via LCD_DRIVERS * Allow
> > specifying default enabled driver via LCD_DEFAULT_DRIVER * Disable g15
> > driver by default (but allow it to be re-enabled using PACKAGECONFIG,
> > assuming the required recipes are also provided). * Fix conf files not
> > going into lcdvc and lcdd packages due to override expansion not
> > happening at the expected time (for CONFFILES_*) * Remove some
> > unnecessary cruft * Move packaging parts of recipe below do_install * Add
> > LIC_FILES_CHKSUM * Make LICENSE more accurate * Add SUMMARY
> > 
> > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> 
> [..]
> 
> > +# Driver packages + +# USB / no USB trickery +
> > +RCONFLICTS_lcdd-driver-hd47780nousb = "lcdd-driver-hd44780"
> > +RCONFLICTS_lcdd-driver-hd47780 = "lcdd-driver-hd44780nousb" +
> > +INITSCRIPT_PACKAGES = "lcdd lcdproc" +INITSCRIPT_NAME_lcdd = "lcdd"
> > +INITSCRIPT_NAME_lcdproc = "lcdproc" +INITSCRIPT_PARAMS_lcdd = "defaults
> > 70 21" +INITSCRIPT_PARAMS_lcdproc = "defaults 71 20"
> 
> Those the stock initscript have LSB headers? They help a lot when using
> systemd to work out dependencies in sysv-compat mode.

Yes they do. I haven't tested them in conjunction with systemd, but they are 
present.

Cheers,
Paul

Patch

diff --git a/meta-oe/recipes-extended/lcdproc/lcdproc/automake-111-fix.patch b/meta-oe/recipes-extended/lcdproc/lcdproc/automake-111-fix.patch
new file mode 100644
index 0000000..061cc22
--- /dev/null
+++ b/meta-oe/recipes-extended/lcdproc/lcdproc/automake-111-fix.patch
@@ -0,0 +1,21 @@ 
+Description: With automake 1.11.3, pkglib_PROGRAMS is not valid anymore, 
+ so work around this by using my_execbin_PROGRAMS.
+Author: Andreas Moog <amoog@ubuntu.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/934265
+
+Upstream-Status: Backport 
+
+Index: lcdproc-0.5.5/server/drivers/Makefile.am
+===================================================================
+--- lcdproc-0.5.5.orig/server/drivers/Makefile.am	2012-02-26 14:04:37.000000000 +0100
++++ lcdproc-0.5.5/server/drivers/Makefile.am	2012-02-26 14:13:17.764467350 +0100
+@@ -20,7 +20,8 @@
+ 
+ ## Keep the lists sorted!
+ 
+-pkglib_PROGRAMS = @DRIVERS@
++my_execbindir = $(pkglibdir)
++my_execbin_PROGRAMS = @DRIVERS@
+ EXTRA_PROGRAMS = bayrad CFontz CFontz633 CFontzPacket curses debug CwLnx ea65 EyeboxOne g15 glcdlib glk hd44780 icp_a106 imon imonlcd IOWarrior irman joy lb216 lcdm001 lcterm lirc lis MD8800 mdm166a ms6931 mtc_s16209x MtxOrb mx5000 NoritakeVFD picolcd pyramid sed1330 sed1520 serialPOS serialVFD shuttleVFD stv5730 SureElec svga t6963 text tyan sli ula200 xosd i2500vfd irtrans
+ noinst_LIBRARIES = libLCD.a libbignum.a
+ 
diff --git a/meta-oe/recipes-extended/lcdproc/lcdproc5.inc b/meta-oe/recipes-extended/lcdproc/lcdproc5.inc
new file mode 100644
index 0000000..50b6b0e
--- /dev/null
+++ b/meta-oe/recipes-extended/lcdproc/lcdproc5.inc
@@ -0,0 +1,77 @@ 
+DESCRIPTION = "LCDproc is a client/server suite to drive all kinds of LCD (-like) devices. The client \
+shipped with this package can be used to acquire various kinds of system stats."
+SUMMARY = "Drivers for character-based LCD displays"
+HOMEPAGE = "http://lcdproc.org"
+SECTION = "utils"
+LICENSE = "GPLv2+"
+DEPENDS = "virtual/libusb0 ncurses"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \
+                    file://README;startline=60;md5=8237b4d4d80a525b15f8162192e07bee"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lcdproc/${P}.tar.gz"
+
+inherit autotools update-rc.d
+
+LCD_DRIVERS ?= "all"
+LCD_DEFAULT_DRIVER ?= "curses"
+
+EXTRA_OECONF = "--enable-drivers=${LCD_DRIVERS} --enable-libusb"
+
+do_install () {
+	# binaries
+	install -D -m 0755 server/LCDd ${D}${sbindir}/LCDd
+	install -D -m 0755 clients/lcdproc/lcdproc ${D}${bindir}/lcdproc
+
+	# init scripts
+	install -d ${D}${sysconfdir}/init.d
+	# so far, not fixed :-( and now even uglier :-((
+	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
+	chmod 0755 ${D}${sysconfdir}/init.d/lcdd
+	install -m 0755 scripts/init-lcdproc.debian ${D}${sysconfdir}/init.d/lcdproc
+	sed -i s'/--oknodo//' ${D}${sysconfdir}/init.d/lcdproc
+
+	# configuration files
+	install -m 0644 LCDd.conf ${D}${sysconfdir}/LCDd.conf
+	sed -i 's!^DriverPath=.*!DriverPath=${libdir}/lcdproc/!' ${D}${sysconfdir}/LCDd.conf
+	sed -i 's!^Driver=.*!Driver=${LCD_DEFAULT_DRIVER}!' ${D}${sysconfdir}/LCDd.conf
+	install -m 0644 clients/lcdproc/lcdproc.conf ${D}${sysconfdir}/lcdproc.conf
+
+	# driver library files
+	install -d ${D}${libdir}/lcdproc
+	for i in server/drivers/*.so; do
+		install -m 0644 $i ${D}${libdir}/lcdproc/
+	done
+}
+
+PACKAGES =+ "lcdd"
+
+RRECOMMENDS_${PN} = "lcdd"
+
+FILES_lcdd = "${sysconfdir}/LCDd.conf \
+	${sbindir}/LCDd \
+	${sysconfdir}/init.d/lcdd"
+
+CONFFILES_lcdd = "${sysconfdir}/LCDd.conf"
+CONFFILES_${PN} = "${sysconfdir}/lcdproc.conf"
+
+# Driver packages
+
+# USB / no USB trickery
+
+RCONFLICTS_lcdd-driver-hd47780nousb = "lcdd-driver-hd44780"
+RCONFLICTS_lcdd-driver-hd47780 = "lcdd-driver-hd44780nousb"
+
+INITSCRIPT_PACKAGES = "lcdd lcdproc"
+INITSCRIPT_NAME_lcdd = "lcdd"
+INITSCRIPT_NAME_lcdproc = "lcdproc"
+INITSCRIPT_PARAMS_lcdd = "defaults 70 21"
+INITSCRIPT_PARAMS_lcdproc = "defaults 71 20"
+
+python populate_packages_prepend() {
+    plugindir = d.expand('${libdir}/lcdproc')
+    do_split_packages(d, plugindir, '(.*)\.so$', 'lcdd-driver-%s', 'LCDd driver for %s', prepend=True)
+}
+
+PACKAGES_DYNAMIC = "lcdd-driver-*"
+
diff --git a/meta-oe/recipes-extended/lcdproc/lcdproc_0.5.5.bb b/meta-oe/recipes-extended/lcdproc/lcdproc_0.5.5.bb
new file mode 100644
index 0000000..0276c55
--- /dev/null
+++ b/meta-oe/recipes-extended/lcdproc/lcdproc_0.5.5.bb
@@ -0,0 +1,24 @@ 
+require lcdproc5.inc
+
+SRC_URI += "file://automake-111-fix.patch"
+
+SRC_URI[md5sum] = "c92d4529d36eeec6d9d6fd0a4aa3ec82"
+SRC_URI[sha256sum] = "b136b47d7bf585a003334f432d8730a36ef5ed1cd520084b919667d825e48d42"
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[g15] = ",,libg15 g15daemon libg15render,"
+
+LCD_DRIVERS_append = "${@base_contains('PACKAGECONFIG', 'g15', '', ',!g15', d)}"
+
+do_install_append () {
+	# binaries
+	install -D -m 0755 clients/lcdvc/lcdvc ${D}${sbindir}/lcdvc
+
+	# configuration files
+	install -D -m 0644 clients/lcdvc/lcdvc.conf ${D}${sysconfdir}/lcdvc.conf
+}
+
+PACKAGES =+ "lcdvc"
+CONFFILES_lcdvc = "${sysconfdir}/lcdvc.conf"
+FILES_lcdvc = "${sysconfdir}/lcdvc.conf ${sbindir}/lcdvc"
+