From 709c4d66e0b107ca606941b988bad717c0b45d9b Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 17 Mar 2009 14:32:59 -0400 Subject: 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 Acked-by: Mike Westerhof Acked-by: Philip Balister Acked-by: Khem Raj Acked-by: Marcin Juszkiewicz Acked-by: Koen Kooi Acked-by: Frans Meulenbroeks --- recipes/xqtlauncher/xqtlauncher-blackbox-config.bb | 17 ++++++++ .../xqtlauncher-blackbox-config/blackboxrc | 1 + .../xqtlauncher-blackbox-config/defaultwm | 1 + recipes/xqtlauncher/xqtlauncher.bb | 34 ++++++++++++++++ recipes/xqtlauncher/xqtlauncher/cleanup.desktop | 5 +++ recipes/xqtlauncher/xqtlauncher/convert.desktop | 5 +++ recipes/xqtlauncher/xqtlauncher/dot.directory | 3 ++ recipes/xqtlauncher/xqtlauncher/startxqt | 15 ++++++++ recipes/xqtlauncher/xqtlauncher/startxqt-wrapper | 5 +++ recipes/xqtlauncher/xqtlauncher/xqtlauncher | 45 ++++++++++++++++++++++ .../xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh | 21 ++++++++++ .../xqtlauncher/xqtlauncher/xqtlauncher-convert.sh | 23 +++++++++++ 12 files changed, 175 insertions(+) create mode 100644 recipes/xqtlauncher/xqtlauncher-blackbox-config.bb create mode 100644 recipes/xqtlauncher/xqtlauncher-blackbox-config/blackboxrc create mode 100644 recipes/xqtlauncher/xqtlauncher-blackbox-config/defaultwm create mode 100644 recipes/xqtlauncher/xqtlauncher.bb create mode 100644 recipes/xqtlauncher/xqtlauncher/cleanup.desktop create mode 100644 recipes/xqtlauncher/xqtlauncher/convert.desktop create mode 100644 recipes/xqtlauncher/xqtlauncher/dot.directory create mode 100644 recipes/xqtlauncher/xqtlauncher/startxqt create mode 100644 recipes/xqtlauncher/xqtlauncher/startxqt-wrapper create mode 100644 recipes/xqtlauncher/xqtlauncher/xqtlauncher create mode 100755 recipes/xqtlauncher/xqtlauncher/xqtlauncher-cleanup.sh create mode 100755 recipes/xqtlauncher/xqtlauncher/xqtlauncher-convert.sh (limited to 'recipes/xqtlauncher') 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 -- cgit v1.2.3