matrix-gui: add new recipe and initscript, from arago overlay
authorKoen Kooi <k-kooi@ti.com>
Mon, 26 Apr 2010 06:12:33 +0000 (02:12 -0400)
committerKoen Kooi <koen@openembedded.org>
Mon, 26 Apr 2010 08:57:17 +0000 (10:57 +0200)
* slightly changed from arago recipe to conform more to OE guidelines

recipes/ti/matrix-gui/init [new file with mode: 0755]
recipes/ti/matrix-gui_svn.bb [new file with mode: 0644]

diff --git a/recipes/ti/matrix-gui/init b/recipes/ti/matrix-gui/init
new file mode 100755 (executable)
index 0000000..fc2aacf
--- /dev/null
@@ -0,0 +1,32 @@
+#! /bin/sh
+
+matrixgui="/usr/bin/matrix_gui"
+
+test -x "$matrixgui" || exit 0
+
+export LD_LIBRARY_PATH=/usr/lib
+export TSLIB_PLUGINDIR=/usr/lib/ts
+export TSLIB_TSDEVICE=/dev/input/touchscreen0
+export TSLIB_CONFFILE=/etc/ts.conf
+export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
+
+case "$1" in
+  start)
+    echo -n "Starting Matrix GUI application"
+    if [ ! -f /etc/pointercal ] ; then
+        ts_calibrate
+    fi
+    start-stop-daemon --start --quiet --background --exec $matrixgui
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping Matrix GUI application"
+    start-stop-daemon --stop --quiet --pidfile /var/run/matrix-gui.pid
+    echo "."
+    ;;
+  *)
+    echo "Usage: /etc/init.d/matrix-gui {start|stop}"
+    exit 1
+esac
+
+exit 0
diff --git a/recipes/ti/matrix-gui_svn.bb b/recipes/ti/matrix-gui_svn.bb
new file mode 100644 (file)
index 0000000..d6b782f
--- /dev/null
@@ -0,0 +1,34 @@
+DESCRIPTION = "Matrix GUI"
+HOMEPAGE = "https://gforge.ti.com/gf/project/matrix_gui/"
+LICENSE = "TI"
+SECTION = "multimedia"
+PRIORITY = "optional"
+
+SRCREV = "15"
+PV = "1.0"
+PR = "r1+svnr${SRCPV}"
+
+SRC_URI = "svn://gforge.ti.com/svn/matrix_gui/;module=trunk;proto=https;user=anonymous;pswd='' \
+           file://init \
+"
+
+S = "${WORKDIR}/trunk"
+
+INITSCRIPT_NAME = "matrix-gui"
+INITSCRIPT_PARAMS = "defaults 99"
+
+inherit qt4e update-rc.d
+
+do_install() {
+       install -d ${D}/${bindir}
+       install -m 0755 ${S}/matrix_gui ${D}/${bindir}
+       install -d ${D}/${datadir}/matrix/html
+       install -m 0644 ${S}/*.html ${D}/${datadir}/matrix/html/
+       install -d ${D}/${datadir}/matrix/images
+       install -m 0644 ${S}/images/*.bmp ${D}/${datadir}/matrix/images/
+       install -d ${D}${sysconfdir}/init.d/
+       install -c -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/matrix-gui
+}
+
+RRECOMMENDS_${PN} = "qt4-embedded-plugin-mousedriver-tslib"
+FILES_${PN} += "${datadir}/matrix/*"