xqtlauncher: add package
authorBernhard Guillon <Bernhard.Guillon@opensimpad.org>
Tue, 25 Nov 2008 17:41:15 +0000 (18:41 +0100)
committerThomas Kunze <thommycheck@gmx.de>
Tue, 25 Nov 2008 17:41:15 +0000 (18:41 +0100)
packages/tasks/task-xqtlauncher.bb [new file with mode: 0644]
packages/xqtlauncher/xqtlauncher-blackbox-config.bb [new file with mode: 0644]
packages/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc [new file with mode: 0644]
packages/xqtlauncher/xqtlauncher-blackbox-config/defaultwm [new file with mode: 0644]
packages/xqtlauncher/xqtlauncher-xkbd-desktop.bb [new file with mode: 0644]
packages/xqtlauncher/xqtlauncher-xkbd-desktop/xkbd.desktop [new file with mode: 0644]
packages/xqtlauncher/xqtlauncher.bb [new file with mode: 0644]
packages/xqtlauncher/xqtlauncher/dot.directory [new file with mode: 0644]
packages/xqtlauncher/xqtlauncher/startxqt [new file with mode: 0644]
packages/xqtlauncher/xqtlauncher/startxqt-wrapper [new file with mode: 0644]
packages/xqtlauncher/xqtlauncher/xqtlauncher [new file with mode: 0644]

diff --git a/packages/tasks/task-xqtlauncher.bb b/packages/tasks/task-xqtlauncher.bb
new file mode 100644 (file)
index 0000000..3d9029e
--- /dev/null
@@ -0,0 +1,21 @@
+DESCRIPTION = "Tasks for xqtlauncher stuff"\r
+SECTION = "opie/base"\r
+LICENSE = "MIT"\r
+PR = "r0"\r
+\r
+inherit task\r
+\r
+PACKAGES = "task-xqtlauncher task-xqtlauncher-blackbox"\r
+\r
+#xkbd is currently needed becuse of a bug at xqt2\r
+RDEPENDS_task-xqtlauncher = "xqtlauncher \\r
+                             xqtlauncher-xkbd-desktop \\r
+                            "\r
+\r
+#\r
+# xqtlauncher with blackbox as wm\r
+#\r
+\r
+RDEPENDS_task-xqtlauncher-blackbox = "xqtlauncher-blackbox-config \\r
+                                     "\r
+\r
diff --git a/packages/xqtlauncher/xqtlauncher-blackbox-config.bb b/packages/xqtlauncher/xqtlauncher-blackbox-config.bb
new file mode 100644 (file)
index 0000000..acd5873
--- /dev/null
@@ -0,0 +1,17 @@
+DESCRIPTION = "blackbox configuration for xqtlauncher which integrates X/Qt2 nicely into opie."
+HOMEPAGE = "http://angstrom-distribution.org/"
+LICENSE = "GPL"
+PR = "r0"
+
+RDEPENDS = "blackbox xqtlauncher"
+
+SRC_URI = "file://blackboxrc \
+           file://defaultwm"
+        
+do_install() {
+       cd ${WORKDIR}
+       install -d ${D}${sysconfdir}
+       install -d ${D}${sysconfdir}/X11
+       install -m 0666 blackboxrc ${D}${sysconfdir}
+       install -m 0666 defaultwm ${D}${sysconfdir}/X11/
+}
diff --git a/packages/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc b/packages/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc
new file mode 100644 (file)
index 0000000..6c86a59
--- /dev/null
@@ -0,0 +1 @@
+session.screen0.toolbar.placement: TopCenter
diff --git a/packages/xqtlauncher/xqtlauncher-blackbox-config/defaultwm b/packages/xqtlauncher/xqtlauncher-blackbox-config/defaultwm
new file mode 100644 (file)
index 0000000..a96cb8b
--- /dev/null
@@ -0,0 +1 @@
+blackbox -rc /etc/blackboxrc
diff --git a/packages/xqtlauncher/xqtlauncher-xkbd-desktop.bb b/packages/xqtlauncher/xqtlauncher-xkbd-desktop.bb
new file mode 100644 (file)
index 0000000..17ba103
--- /dev/null
@@ -0,0 +1,19 @@
+DESCRIPTION = "xqtlauncher integrates X/Qt2 nicely into opie. You can launch applications with it from opies menue"
+HOMEPAGE = "http://angstrom-distribution.org/"
+LICENSE = "GPL"
+PR = "r0"
+
+RDEPENDS = "xkbd xqtlauncher"
+
+SRC_URI = "file://xkbd.desktop"
+        
+do_install() {
+       cd ${WORKDIR}
+       install -d ${D}${bindir}
+       install -d ${D}${palmtopdir}/apps/XQt2/
+       install -m 0644 xkbd.desktop ${D}${palmtopdir}/apps/XQt2
+       ln -sf   ${bindir}/xqtlauncher  ${D}${bindir}/runxkbd
+}
+
+FILES_${PN} += "${palmtopdir}/apps/XQt2 \
+       ${palmtopdir}/apps/XQt2/xkbd.desktop "
diff --git a/packages/xqtlauncher/xqtlauncher-xkbd-desktop/xkbd.desktop b/packages/xqtlauncher/xqtlauncher-xkbd-desktop/xkbd.desktop
new file mode 100644 (file)
index 0000000..78decbf
--- /dev/null
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Exec=runxkbd xkbd
+Icon=Xqt.png
+Type=Application
+Name=X/Qt2 with xkbd
diff --git a/packages/xqtlauncher/xqtlauncher.bb b/packages/xqtlauncher/xqtlauncher.bb
new file mode 100644 (file)
index 0000000..0897ddb
--- /dev/null
@@ -0,0 +1,22 @@
+DESCRIPTION = "xqtlauncher integrates X/Qt2 nicely into opie. You can launch applications with it from opies menue"
+HOMEPAGE = "http://angstrom-distribution.org/"
+LICENSE = "GPL"
+PR = "r0"
+
+RDEPENDS = "xqt2 xorg-minimal-fonts"
+
+SRC_URI = "file://dot.directory \
+       file://startxqt \
+       file://startxqt-wrapper \
+       file://xqtlauncher "
+        
+do_install() {
+       cd ${WORKDIR}
+       install -d ${D}${bindir}
+       install -m 0755 startxqt startxqt-wrapper xqtlauncher ${D}${bindir}
+       install -d ${D}${palmtopdir}/apps/XQt2/
+       install -m 0644 dot.directory ${D}${palmtopdir}/apps/XQt2
+}
+
+FILES_${PN} += "${palmtopdir}/apps/XQt2 \
+       ${palmtopdir}/apps/XQt2/.directory "
diff --git a/packages/xqtlauncher/xqtlauncher/dot.directory b/packages/xqtlauncher/xqtlauncher/dot.directory
new file mode 100644 (file)
index 0000000..3c63f7f
--- /dev/null
@@ -0,0 +1,3 @@
+[Desktop Entry]
+Icon=Xqt.png
+Name=X/Qt2
diff --git a/packages/xqtlauncher/xqtlauncher/startxqt b/packages/xqtlauncher/xqtlauncher/startxqt
new file mode 100644 (file)
index 0000000..b863c2e
--- /dev/null
@@ -0,0 +1,15 @@
+#check if we are already running
+if test -f /var/run/Xqt ;then
+        qcop QPE/TaskBar "message(QString)" "Xqt is already running!"
+else
+        qcop QPE/TaskBar "message(QString)" "start Xqt server..."
+        #create run file
+        touch /var/run/Xqt
+        #setup environment - FIXME: check QTDIR first
+        export QTDIR=/usr/lib/opie
+        export DISPLAY=:0.0
+        #start the server
+        Xqt -fp /usr/lib/X11/fonts/misc
+        #remove run file
+        rm /var/run/Xqt 
+fi
diff --git a/packages/xqtlauncher/xqtlauncher/startxqt-wrapper b/packages/xqtlauncher/xqtlauncher/startxqt-wrapper
new file mode 100644 (file)
index 0000000..c0ac2ed
--- /dev/null
@@ -0,0 +1,5 @@
+startxqt &
+sleep 3
+#read and start defaultwm from /etc/X11/defaultwm
+$(cat /etc/X11/defaultwm) &
+sleep 2
diff --git a/packages/xqtlauncher/xqtlauncher/xqtlauncher b/packages/xqtlauncher/xqtlauncher/xqtlauncher
new file mode 100644 (file)
index 0000000..4f2c9f9
--- /dev/null
@@ -0,0 +1,45 @@
+#set DISPLAY
+export DISPLAY=:0.0
+#check if the application is installed
+if which $1 ; then
+        echo start $1
+        #is Xqt running?        
+        if test ! -f /var/run/Xqt ;then
+                #start Xqt              
+                startxqt-wrapper
+        fi
+        #do we have atomate access? FIXME: make a function out of this and loop it
+        if test -f /var/lock/xqtlauncher; then
+                qcop QPE/TaskBar "message(QString)" "Was not able to lock access. Try again or remove /var/lock/xqtlauncher"
+        else
+                #lock access
+                touch /var/lock/xqtlauncher
+                if test -f /var/run/xqtlauncher; then
+                        #atomate write nuber of applications running in xqt +1
+                        echo $(($(cat /var/run/xqtlauncher ) + 1)) > /var/run/xqtlauncher
+                else
+                        echo 1 > /var/run/xqtlauncher
+                fi              
+                #remove lock
+                rm /var/lock/xqtlauncher
+                #start application
+                $1
+                #do we have atomate access? FIXME: make a function out of this and loop it
+                if test -f /var/lock/xqtlauncher; then
+                        qcop QPE/TaskBar "message(QString)" "Was not able to lock access. Try again or remove /var/lock/xqtlauncher" 
+                else
+                        #lock access
+                        touch /var/lock/xqtlauncher
+                        COUNTXQT=$(($(cat /var/run/xqtlauncher ) -1))
+                        echo $COUNTXQT > /var/run/xqtlauncher 
+                        if [ $COUNTXQT -le 0 ] ; then
+                                #kill Xqt if there is no application running.
+                                killall Xqt
+                        fi
+                        #remove lock                                            
+                        rm /var/lock/xqtlauncher
+                fi
+        fi
+else
+        qcop QPE/TaskBar "message(QString)" "Application not found"
+fi