diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-07-24 17:57:24 +0100 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-07-30 02:35:12 +0100 |
commit | e9b45ff67d32fdc27950a51135b6dabada8334e7 (patch) | |
tree | de99cd760c8292ee1dd334e23e1e5cc43e90dfbd /recipes-qtopia/xqtlauncher | |
download | meta-opie-e9b45ff67d32fdc27950a51135b6dabada8334e7.tar.gz |
initial commit of meta-opie
Populate the repository with files from OpenEmbedded at revision
45edf621296daf150c72b876d720861235e5762e - no changes, only rearranged
the directory structure to match the new oe-core style and added
COPYING.MIT and README.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'recipes-qtopia/xqtlauncher')
12 files changed, 175 insertions, 0 deletions
diff --git a/recipes-qtopia/xqtlauncher/xqtlauncher-blackbox-config.bb b/recipes-qtopia/xqtlauncher/xqtlauncher-blackbox-config.bb new file mode 100644 index 0000000..37843a2 --- /dev/null +++ b/recipes-qtopia/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 = "r1" + +RDEPENDS_${PN} = "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-qtopia/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc b/recipes-qtopia/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc new file mode 100644 index 0000000..6c86a59 --- /dev/null +++ b/recipes-qtopia/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc @@ -0,0 +1 @@ +session.screen0.toolbar.placement: TopCenter diff --git a/recipes-qtopia/xqtlauncher/xqtlauncher-blackbox-config/defaultwm b/recipes-qtopia/xqtlauncher/xqtlauncher-blackbox-config/defaultwm new file mode 100644 index 0000000..a96cb8b --- /dev/null +++ b/recipes-qtopia/xqtlauncher/xqtlauncher-blackbox-config/defaultwm @@ -0,0 +1 @@ +blackbox -rc /etc/blackboxrc diff --git a/recipes-qtopia/xqtlauncher/xqtlauncher.bb b/recipes-qtopia/xqtlauncher/xqtlauncher.bb new file mode 100644 index 0000000..b4203d4 --- /dev/null +++ b/recipes-qtopia/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 = "r3" + +RDEPENDS_${PN} = "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-qtopia/xqtlauncher/xqtlauncher/cleanup.desktop b/recipes-qtopia/xqtlauncher/xqtlauncher/cleanup.desktop new file mode 100644 index 0000000..d043617 --- /dev/null +++ b/recipes-qtopia/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-qtopia/xqtlauncher/xqtlauncher/convert.desktop b/recipes-qtopia/xqtlauncher/xqtlauncher/convert.desktop new file mode 100644 index 0000000..ca70c43 --- /dev/null +++ b/recipes-qtopia/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-qtopia/xqtlauncher/xqtlauncher/dot.directory b/recipes-qtopia/xqtlauncher/xqtlauncher/dot.directory new file mode 100644 index 0000000..3c63f7f --- /dev/null +++ b/recipes-qtopia/xqtlauncher/xqtlauncher/dot.directory @@ -0,0 +1,3 @@ +[Desktop Entry] +Icon=Xqt.png +Name=X/Qt2 diff --git a/recipes-qtopia/xqtlauncher/xqtlauncher/startxqt b/recipes-qtopia/xqtlauncher/xqtlauncher/startxqt new file mode 100644 index 0000000..b863c2e --- /dev/null +++ b/recipes-qtopia/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-qtopia/xqtlauncher/xqtlauncher/startxqt-wrapper b/recipes-qtopia/xqtlauncher/xqtlauncher/startxqt-wrapper new file mode 100644 index 0000000..c0ac2ed --- /dev/null +++ b/recipes-qtopia/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-qtopia/xqtlauncher/xqtlauncher/xqtlauncher b/recipes-qtopia/xqtlauncher/xqtlauncher/xqtlauncher new file mode 100644 index 0000000..4f2c9f9 --- /dev/null +++ b/recipes-qtopia/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-qtopia/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh b/recipes-qtopia/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh new file mode 100755 index 0000000..3ccf333 --- /dev/null +++ b/recipes-qtopia/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-qtopia/xqtlauncher/xqtlauncher/xqtlauncher-convert.sh b/recipes-qtopia/xqtlauncher/xqtlauncher/xqtlauncher-convert.sh new file mode 100755 index 0000000..59efad3 --- /dev/null +++ b/recipes-qtopia/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 |