qt4e: add 2 images
authorEric Bénard <eric@eukrea.com>
Tue, 2 Nov 2010 16:51:59 +0000 (17:51 +0100)
committerEric Bénard <eric@eukrea.com>
Wed, 3 Nov 2010 22:20:16 +0000 (23:20 +0100)
- qt4e-base-image : contains qt4 embedded libraries and can be used
as a base rootfs when developping using the sdk
- qt4e-demo-image : contains qt-base-image + qt-demo + a script to
launch qt-demo at boot, this image can be used to quickly setup
a demonstration of qt capabilities on a machine using qtdemo
- qt-demo-init : recipe creating the package which provides the
init script to lauch qtdemo.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Khem Raj <raj.khem@gmail.com>
recipes/images/qt4e-base-image.bb [new file with mode: 0644]
recipes/images/qt4e-demo-image.bb [new file with mode: 0644]
recipes/qt4/qt-demo-init/qtdemo-init [new file with mode: 0644]
recipes/qt4/qt-demo-init_0.1.bb [new file with mode: 0644]

diff --git a/recipes/images/qt4e-base-image.bb b/recipes/images/qt4e-base-image.bb
new file mode 100644 (file)
index 0000000..4aa24da
--- /dev/null
@@ -0,0 +1,51 @@
+require micro-base-image.bb
+
+TOUCH = ' ${@base_contains("MACHINE_FEATURES", "touchscreen", "tslib tslib-calibrate tslib-tests", "",d)}'
+
+RDEPENDS_append += " \
+        qt4-embedded \
+       "
+
+QTE_INSTALL = " \
+       libqt-embedded3support4 \
+       libqt-embeddedclucene4 \
+       libqt-embeddedcore4 \
+       libqt-embeddeddbus4 \
+       libqt-embeddedgui4 \
+       libqt-embeddedhelp4 \
+       libqt-embeddedmultimedia4 \
+       libqt-embeddednetwork4 \
+       libqt-embeddedscript4 \
+       libqt-embeddedscripttools4 \
+       libqt-embeddedsql4 \
+       libqt-embeddedsvg4 \
+       libqt-embeddedtest4 \
+       libqt-embeddedwebkit4 \
+       libqt-embeddedxml4 \
+       libqt-embeddedxmlpatterns4 \
+       qt4-embedded-fonts-ttf-dejavu \
+       qt4-embedded-fonts-ttf-vera \
+       qt4-embedded-plugin-iconengine-svgicon \
+       qt4-embedded-plugin-imageformat-gif \
+       qt4-embedded-plugin-imageformat-ico \
+       qt4-embedded-plugin-imageformat-jpeg \
+       qt4-embedded-plugin-imageformat-mng \
+       qt4-embedded-plugin-imageformat-svg \
+       qt4-embedded-plugin-imageformat-tiff \
+       qt4-embedded-plugin-mousedriver-tslib \
+       qt4-embedded-plugin-phonon-backend-gstreamer \
+       qt4-embedded-plugin-script-dbus \
+       qt4-embedded-plugin-sqldriver-sqlite2 \
+       qt4-embedded-plugin-sqldriver-sqlite \
+"
+
+IMAGE_INSTALL += "\
+       initscripts \
+       kernel-modules \
+       gdbserver \
+       strace \
+       module-init-tools \
+       ${QTE_INSTALL} \
+       ${TOUCH} \
+       qwt-e \
+"
diff --git a/recipes/images/qt4e-demo-image.bb b/recipes/images/qt4e-demo-image.bb
new file mode 100644 (file)
index 0000000..b442a2e
--- /dev/null
@@ -0,0 +1,7 @@
+require qt4e-base-image.bb
+
+IMAGE_INSTALL += "\
+        qt4-embedded-demos qt4-embedded-examples qt-demo-init \
+       qt4-embedded-assistant \
+       qwt-e-examples \
+"
diff --git a/recipes/qt4/qt-demo-init/qtdemo-init b/recipes/qt4/qt-demo-init/qtdemo-init
new file mode 100644 (file)
index 0000000..8eb8771
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+set -e
+
+if [ -f /usr/bin/qtdemo ]; then
+       QTDEMO=qtdemo
+else
+       QTDEMO="qtdemoE -qws"
+fi
+
+case "$1" in
+  start)
+       echo "Starting qtdemo"
+       if [ -f /etc/profile.d/tslib.sh ]; then
+               source /etc/profile.d/tslib.sh
+       fi
+       if [ -e $TSLIB_TSDEVICE ]; then
+               if [ ! -f /etc/pointercal ]; then
+                       /usr/bin/ts_calibrate
+               fi
+               QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO &
+       else
+               $QTDEMO &
+       fi
+       ;;
+  stop)
+       echo "Stopping qtdemo"
+       killall qtdemoE
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       ;;
+  *)
+       echo "usage: $0 { start | stop | restart }" >&2
+       exit 1
+       ;;
+esac
+
+exit 0
diff --git a/recipes/qt4/qt-demo-init_0.1.bb b/recipes/qt4/qt-demo-init_0.1.bb
new file mode 100644 (file)
index 0000000..223ea7e
--- /dev/null
@@ -0,0 +1,16 @@
+DESCRIPTION = "Init script for qtdemo"
+LICENSE = "MIT"
+SRC_URI = "file://qtdemo-init"
+PR = "r0"
+
+PACKAGE_ARCH = "all"
+
+do_install() {
+       install -d ${D}${sysconfdir}/init.d/
+       install -m 0755 ${WORKDIR}/qtdemo-init ${D}${sysconfdir}/init.d/qtdemo
+}
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "qtdemo"
+INITSCRIPT_PARAMS = "start 99 5 2 . stop 19 0 1 6 ."