aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/xqtlauncher
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/xqtlauncher
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
downloadopenembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.gz
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/xqtlauncher')
-rw-r--r--recipes/xqtlauncher/xqtlauncher-blackbox-config.bb17
-rw-r--r--recipes/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc1
-rw-r--r--recipes/xqtlauncher/xqtlauncher-blackbox-config/defaultwm1
-rw-r--r--recipes/xqtlauncher/xqtlauncher.bb34
-rw-r--r--recipes/xqtlauncher/xqtlauncher/cleanup.desktop5
-rw-r--r--recipes/xqtlauncher/xqtlauncher/convert.desktop5
-rw-r--r--recipes/xqtlauncher/xqtlauncher/dot.directory3
-rw-r--r--recipes/xqtlauncher/xqtlauncher/startxqt15
-rw-r--r--recipes/xqtlauncher/xqtlauncher/startxqt-wrapper5
-rw-r--r--recipes/xqtlauncher/xqtlauncher/xqtlauncher45
-rwxr-xr-xrecipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh21
-rwxr-xr-xrecipes/xqtlauncher/xqtlauncher/xqtlauncher-convert.sh23
12 files changed, 175 insertions, 0 deletions
diff --git a/recipes/xqtlauncher/xqtlauncher-blackbox-config.bb b/recipes/xqtlauncher/xqtlauncher-blackbox-config.bb
new file mode 100644
index 0000000000..acd5873e5b
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher-blackbox-config.bb
@@ -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/recipes/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc b/recipes/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc
new file mode 100644
index 0000000000..6c86a59a0b
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc
@@ -0,0 +1 @@
+session.screen0.toolbar.placement: TopCenter
diff --git a/recipes/xqtlauncher/xqtlauncher-blackbox-config/defaultwm b/recipes/xqtlauncher/xqtlauncher-blackbox-config/defaultwm
new file mode 100644
index 0000000000..a96cb8b9e5
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher-blackbox-config/defaultwm
@@ -0,0 +1 @@
+blackbox -rc /etc/blackboxrc
diff --git a/recipes/xqtlauncher/xqtlauncher.bb b/recipes/xqtlauncher/xqtlauncher.bb
new file mode 100644
index 0000000000..5fc80b1e51
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher.bb
@@ -0,0 +1,34 @@
+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 = "r2"
+
+RDEPENDS = "xqt2 xorg-minimal-fonts"
+
+SRC_URI = "file://dot.directory \
+ file://startxqt \
+ file://startxqt-wrapper \
+ file://xqtlauncher-convert.sh \
+ file://xqtlauncher-cleanup.sh \
+ file://convert.desktop \
+ file://cleanup.desktop \
+ 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/.directory
+ install -m 0644 convert.desktop cleanup.desktop ${D}${palmtopdir}/apps/XQt2/
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 startxqt startxqt-wrapper xqtlauncher xqtlauncher-cleanup.sh xqtlauncher-convert.sh ${D}${sysconfdir}/init.d/
+ install -d ${D}${sysconfdir}/rc5.d/
+ ln -sf ../init.d/xqtlauncher-convert.sh ${D}${sysconfdir}/rc5.d/S98xqtlauncher-convert
+ ln -sf ../init.d/xqtlauncher-cleanup.sh ${D}${sysconfdir}/rc5.d/S98xqtlauncher-cleanup
+}
+
+FILES_${PN} += "${palmtopdir}/apps/XQt2 \
+ ${palmtopdir}/apps/XQt2/convert.desktop \
+ ${palmtopdir}/apps/XQt2/cleanup.desktop \
+ ${palmtopdir}/apps/XQt2/.directory "
diff --git a/recipes/xqtlauncher/xqtlauncher/cleanup.desktop b/recipes/xqtlauncher/xqtlauncher/cleanup.desktop
new file mode 100644
index 0000000000..d0436178ad
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher/cleanup.desktop
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Exec=/etc/init.d/xqtlauncher-cleanup.sh
+Icon=Xqt.png
+Type=Application
+Name=Cleanup Icons
diff --git a/recipes/xqtlauncher/xqtlauncher/convert.desktop b/recipes/xqtlauncher/xqtlauncher/convert.desktop
new file mode 100644
index 0000000000..ca70c43bdb
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher/convert.desktop
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Exec=/etc/init.d/xqtlauncher-convert.sh
+Icon=Xqt.png
+Type=Application
+Name=Create Icons
diff --git a/recipes/xqtlauncher/xqtlauncher/dot.directory b/recipes/xqtlauncher/xqtlauncher/dot.directory
new file mode 100644
index 0000000000..3c63f7f241
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher/dot.directory
@@ -0,0 +1,3 @@
+[Desktop Entry]
+Icon=Xqt.png
+Name=X/Qt2
diff --git a/recipes/xqtlauncher/xqtlauncher/startxqt b/recipes/xqtlauncher/xqtlauncher/startxqt
new file mode 100644
index 0000000000..b863c2e3ae
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher/startxqt
@@ -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/recipes/xqtlauncher/xqtlauncher/startxqt-wrapper b/recipes/xqtlauncher/xqtlauncher/startxqt-wrapper
new file mode 100644
index 0000000000..c0ac2ed8d0
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher/startxqt-wrapper
@@ -0,0 +1,5 @@
+startxqt &
+sleep 3
+#read and start defaultwm from /etc/X11/defaultwm
+$(cat /etc/X11/defaultwm) &
+sleep 2
diff --git a/recipes/xqtlauncher/xqtlauncher/xqtlauncher b/recipes/xqtlauncher/xqtlauncher/xqtlauncher
new file mode 100644
index 0000000000..4f2c9f937c
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher/xqtlauncher
@@ -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
diff --git a/recipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh b/recipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh
new file mode 100755
index 0000000000..3ccf333237
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh
@@ -0,0 +1,21 @@
+#!/bin/ash
+#This program cleans up the mess which convert.sh leaves if you remove a package
+for i in `find /usr/lib/opie/apps/XQt2 -name *.desktop`; do
+ export name=$(echo $i | awk 'BEGIN {FS="."} {gsub("/",".")} {print $(NF-1)}')
+ #don't delete convert and cleanup icons
+ if [ $i != "/usr/lib/opie/apps/XQt2/convert.desktop" ] && [ $i != "/usr/lib/opie/apps/XQt2/cleanup.desktop" ] ; then
+ newfile=$(find /usr/share/applications/ -name $name.desktop)
+ else
+ newfile="donotdelete"
+ fi
+ if [ -z $newfile ] ; then
+ echo $name
+ echo $i
+ icon=$(cat $i | awk 'BEGIN {FS="="} {if ($1 == "Icon") {print $2} }')
+ rm -f /usr/lib/opie/bin/run$name
+ find /usr/lib/opie/pics/ -name $icon.* -exec rm -f {} \;
+ rm -f $i
+ fi
+done
+#update the icons
+/usr/bin/icon-reload.sh
diff --git a/recipes/xqtlauncher/xqtlauncher/xqtlauncher-convert.sh b/recipes/xqtlauncher/xqtlauncher/xqtlauncher-convert.sh
new file mode 100755
index 0000000000..59efad3be3
--- /dev/null
+++ b/recipes/xqtlauncher/xqtlauncher/xqtlauncher-convert.sh
@@ -0,0 +1,23 @@
+#!/bin/ash
+#This program converts /usr/share/applications/*.desktop in /usr/lib/opie/apps/XQt2/*.desktop files.
+for i in `find /usr/share/applications -name *.desktop`; do
+ export name=$(echo $i | awk 'BEGIN {FS="."} {gsub("/",".")} {print $(NF-1)}')
+ newfile=/usr/lib/opie/apps/XQt2/$name.desktop
+ if [ ! -f $newfile ] ; then
+ #cat $i | awk 'BEGIN {FS="="} {if ($1 == "Exec") {print "Exec=run"ENVIRON["name"]" " $2} else if ($1 == "Icon") {print "Icon=/usr/share/pixmaps/"$2} else {print $0} }' > $newfile
+ cat $i | awk 'BEGIN {FS="="} {if ($1 == "Exec") {print "Exec=/usr/lib/opie/bin/run"ENVIRON["name"]" " $2} else {print $0} }' > $newfile
+ icon=$(cat $i | awk 'BEGIN {FS="="} {if ($1 == "Icon") {print $2} }')
+ ln -sf /usr/bin/xqtlauncher /usr/lib/opie/bin/run$name
+ #We need to make symlinks for the pics because opie can not handle pics with paths :(
+ #Check if it has a leading /!
+ if expr $icon : />/dev/null ; then
+ echo $icon
+ ln -sf $icon /usr/lib/opie/pics/$(echo $icon | awk 'BEGIN {FS="/"} {print $NF}')
+ else
+ echo $icon
+ ln -sf $(find /usr/share/pixmaps -name $icon) /usr/lib/opie/pics/$(echo $icon | awk 'BEGIN {FS="/"} {print $NF}')
+ fi
+ fi
+done
+#update the icons
+/usr/bin/icon-reload.sh