matrix-gui-common: Move common files into one pkg
authorChase Maupin <chase.maupin@ti.com>
Thu, 27 May 2010 16:01:30 +0000 (11:01 -0500)
committerKoen Kooi <koen@openembedded.org>
Fri, 28 May 2010 07:21:15 +0000 (09:21 +0200)
* Created the matrix-gui-common_svn.bb recipe to contain all of
  the common html, scripts, and image files used by both versions
  of the matrix GUI application.
* Removed the html, script, and image files from matrix-gui and
  matrix-gui-e recipes.
* Added dependency on matrix-gui-common to matrix-gui and
  matrix-gui-e recipes.
* Added browser executable that looks for the example browser
  from the Qt demos package depending on whether the embedded
  or X11 version of the matrix GUI application is running.

Acked-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Chase Maupin <chase.maupin@ti.com>
Signed-off-by: Koen Kooi <k-kooi@ti.com>
recipes/ti/matrix-gui-common/browser [new file with mode: 0644]
recipes/ti/matrix-gui-common_svn.bb [new file with mode: 0644]
recipes/ti/matrix-gui-e_svn.bb
recipes/ti/matrix-gui_svn.bb

diff --git a/recipes/ti/matrix-gui-common/browser b/recipes/ti/matrix-gui-common/browser
new file mode 100644 (file)
index 0000000..b5202d5
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+BROWSERDIR=""
+BROWSERAPP="browser"
+
+#Check if DISPLAY is set.  If so we assume we are running in X11
+#and will call the X11 version of the browser if it exists.
+if [ "$DISPLAY" == "" ]
+then
+    BROWSERDIR="/usr/bin/qtopia/demos/browser"
+else
+    BROWSERDIR="/usr/bin/qt4/demos/browser"
+fi
+
+if [ -e "$BROWSERDIR/$BROWSERAPP" ]
+then
+    cd $BROWSERDIR
+    ./$BROWSERAPP
+fi
+
diff --git a/recipes/ti/matrix-gui-common_svn.bb b/recipes/ti/matrix-gui-common_svn.bb
new file mode 100644 (file)
index 0000000..43d6b0c
--- /dev/null
@@ -0,0 +1,47 @@
+DESCRIPTION = "Common files for all versions of Matrix GUI"
+HOMEPAGE = "https://gforge.ti.com/gf/project/matrix_gui/"
+LICENSE = "BSD"
+SECTION = "multimedia"
+PRIORITY = "optional"
+
+SRCREV = "58"
+PV = "1.0"
+PR = "r1+svnr${SRCPV}"
+
+#Checkout the project repository to get access to the scripts and data
+#files.
+SRC_URI = "svn://gforge.ti.com/svn/matrix_gui/;module=trunk;proto=https;user=anonymous;pswd='' \
+    file://browser \
+"
+
+S = "${WORKDIR}/trunk"
+
+MATRIX_EXTRA_BINS = " \
+    memInfo \
+    networkSettings \
+    runOGLES2Coverflow \
+    runOGLES2Shaders \
+    runOGLESChameleonMan \
+    runOGLESVase \
+    setopp1 \
+    setopp2 \
+    setopp3 \
+    setopp4 \
+    standby \
+    sysSettings \
+    taskInfo \
+"
+
+do_install() {
+    install -d ${D}/${bindir}
+    for i in ${MATRIX_EXTRA_BINS}; do
+        install -m 0755 ${S}/bin/${i} ${D}/${bindir}
+    done
+    install -m 0755 ${WORKDIR}/browser ${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/*.png ${D}/${datadir}/matrix/images/
+}
+
+FILES_${PN} += "${datadir}/matrix/*"
index 38846fe..0efa19b 100644 (file)
@@ -6,7 +6,7 @@ PRIORITY = "optional"
 
 SRCREV = "58"
 PV = "1.0"
-PR = "r7+svnr${SRCPV}"
+PR = "r9+svnr${SRCPV}"
 
 SRC_URI = "svn://gforge.ti.com/svn/matrix_gui/;module=trunk;proto=https;user=anonymous;pswd='' \
        file://init \
@@ -19,35 +19,11 @@ INITSCRIPT_PARAMS = "defaults 99"
 
 inherit qt4e update-rc.d
 
-MATRIX_EXTRA_BINS = " \
-       memInfo \
-       networkSettings \
-       runOGLES2Coverflow \
-       runOGLES2Shaders \
-       runOGLESChameleonMan \
-       runOGLESVase \
-       setopp1 \
-       setopp2 \
-       setopp3 \
-       setopp4 \
-       standby \
-       sysSettings \
-       taskInfo \
-"
-
 do_install() {
        install -d ${D}/${bindir}
        install -m 0755 ${S}/matrix_gui ${D}/${bindir}/matrix_guiE
-       for i in ${MATRIX_EXTRA_BINS}; do
-               install -m 0755 ${S}/bin/${i} ${D}/${bindir}
-       done
-       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/*.png ${D}/${datadir}/matrix/images/
        install -d ${D}${sysconfdir}/init.d/
        install -c -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/matrix-gui-e
 }
 
 RRECOMMENDS_${PN} = "qt4-embedded-plugin-mousedriver-tslib"
-FILES_${PN} += "${datadir}/matrix/*"
index e5fc01d..4388d28 100644 (file)
@@ -6,7 +6,7 @@ PRIORITY = "optional"
 
 SRCREV = "58"
 PV = "1.0"
-PR = "r13+svnr${SRCPV}"
+PR = "r14+svnr${SRCPV}"
 
 SRC_URI = "svn://gforge.ti.com/svn/matrix_gui/;module=trunk;proto=https;user=anonymous;pswd='' \
     file://0001-Disable-cursor-override-for-X11.patch;patch=1 \
@@ -18,32 +18,9 @@ S = "${WORKDIR}/trunk"
 
 inherit qt4x11
 
-MATRIX_EXTRA_BINS = " \
-       memInfo \
-       networkSettings \
-       runOGLES2Coverflow \
-       runOGLES2Shaders \
-       runOGLESChameleonMan \
-       runOGLESVase \
-       setopp1 \
-       setopp2 \
-       setopp3 \
-       setopp4 \
-       standby \
-       sysSettings \
-       taskInfo \
-"
-
 do_install() {
        install -d ${D}/${bindir}
        install -m 0755 ${S}/matrix_gui ${D}/${bindir}
-       for i in ${MATRIX_EXTRA_BINS}; do
-               install -m 0755 ${S}/bin/${i} ${D}/${bindir}
-       done
-       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/*.png ${D}/${datadir}/matrix/images/
        install -d ${D}${sysconfdir}/init.d/
        install -c -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/matrix-gui
     install -d ${D}/${sysconfdir}/xdg/autostart
@@ -51,9 +28,10 @@ do_install() {
 }
 
 FILES_${PN}-autostart = "${sysconfdir}/xdg/autostart/matrix-gui.desktop"
-FILES_${PN} += "${datadir}/matrix/*"
 
 #Make autostart package depend on matrix-gui package.  Doesn't make sense
 #to install the autostart package without the underlying matrix-gui package.
-RDEPENDS_${PN}-autostart = "${PN}"
+RDEPENDS_${PN}-autostart += "${PN}"
 PACKAGES =+ "${PN}-autostart"
+
+RDEPENDS_${PN} += "matrix-gui-common"