summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiaofeng Yan <xiaofeng.yan@windriver.com>2011-08-31 09:39:58 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-31 19:59:58 +0100
commitd5edc9c1a0de0df9f2fb16f29592d6c9fc27e92d (patch)
tree6cb94ad3c576927e73e928593a78365f140bd8a1
parente2ff50830bd35031252882465a362a25d0b5d41f (diff)
downloadpoky-d5edc9c1a0de0df9f2fb16f29592d6c9fc27e92d.tar.gz
qt-demo-init: Fix bug 999
[YOCTO #999] qt4e-demo-image needs qt-demo-init when starting qtdemoE. qt-demo-init was pulled from Openembeded. (From OE-Core rev: e21e8b502ab2f982836cf1f7a30e33bff1bd5b7b) Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init55
-rw-r--r--meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb19
2 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init b/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init
new file mode 100644
index 0000000000..affb9589ea
--- /dev/null
+++ b/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init
@@ -0,0 +1,55 @@
1#!/bin/sh
2
3set -e
4
5if [ -f /usr/bin/qtdemo ]; then
6 QTDEMO="qtdemo > /var/log/Xsession.log 2> &1"
7else
8 QTDEMO="qtdemoE -qws"
9fi
10
11case "$1" in
12 start)
13 echo "Starting qtdemo"
14 if [ -f /etc/profile.d/tslib.sh ]; then
15 source /etc/profile.d/tslib.sh
16 fi
17 if [ -e $TSLIB_TSDEVICE ]; then
18 if [ ! -f /etc/pointercal ]; then
19 /usr/bin/ts_calibrate
20 fi
21 if [ $QTDEMO == qtdemo ]; then
22 Xorg &
23 export DISPLAY=:0
24 $QTDEMO &
25 else
26 QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO &
27 fi
28 else
29 if [ $QTDEMO == qtdemo ]; then
30 Xorg &
31 export DISPLAY=:0
32 fi
33 $QTDEMO &
34 fi
35 ;;
36 stop)
37 echo "Stopping qtdemo"
38 if [ $QTDEMO == qtdemo ]; then
39 killall Xorg
40 killall qtdemo
41 else
42 killall qtdemoE
43 fi
44 ;;
45 restart)
46 $0 stop
47 $0 start
48 ;;
49 *)
50 echo "usage: $0 { start | stop | restart }" >&2
51 exit 1
52 ;;
53esac
54
55exit 0
diff --git a/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb b/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb
new file mode 100644
index 0000000000..8d0dd19227
--- /dev/null
+++ b/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb
@@ -0,0 +1,19 @@
1DESCRIPTION = "Init script for qtdemo"
2LICENSE = "MIT"
3SRC_URI = "file://qtdemo-init"
4PR = "r2"
5
6LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
7 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
8
9PACKAGE_ARCH = "all"
10
11do_install() {
12 install -d ${D}${sysconfdir}/init.d/
13 install -m 0755 ${WORKDIR}/qtdemo-init ${D}${sysconfdir}/init.d/qtdemo
14}
15
16inherit update-rc.d
17
18INITSCRIPT_NAME = "qtdemo"
19INITSCRIPT_PARAMS = "start 99 5 2 . stop 19 0 1 6 ."