Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=interim.git;a=commitdiff;h=300e5610a38cda033869ca3b38b7da6dfe356a19

commit 300e5610a38cda033869ca3b38b7da6dfe356a19
Author: James Buren <[EMAIL PROTECTED]>
Date:   Thu Jul 31 23:36:48 2008 -0500

rox-filer-2.8-2-i686
* added a shell script i wrote for converting regular desktop files to
* rox app directories
* release bump

diff --git a/source/rox-extra/rox-filer/FrugalBuild 
b/source/rox-extra/rox-filer/FrugalBuild
index 394fb9d..1246d0b 100644
--- a/source/rox-extra/rox-filer/FrugalBuild
+++ b/source/rox-extra/rox-filer/FrugalBuild
@@ -3,7 +3,7 @@

pkgname=rox-filer
pkgver=2.8
-pkgrel=1
+pkgrel=2
pkgdesc="ROX-Filer is a fast and powerful graphical file manager."
_F_rox_name="ROX-Filer"
_F_rox_use_sourceforge=1
@@ -21,6 +21,7 @@ build()
Fbuild_rox
Fman $pkgname-$pkgver/rox.1
Fwrapper "exec $_F_rox_installpath/AppRun \"[EMAIL PROTECTED]"" rox
+       Fexe /usr/bin/desktop2appdir
}

# optimization OK
diff --git a/source/rox-extra/rox-filer/README.Frugalware 
b/source/rox-extra/rox-filer/README.Frugalware
new file mode 100644
index 0000000..8025b55
--- /dev/null
+++ b/source/rox-extra/rox-filer/README.Frugalware
@@ -0,0 +1,3 @@
+Use the included desktop2appfile shell script, if you want an automatic way of
+converting system installed desktop files in /usr/share/applications to a ROX
+appdir.
diff --git a/source/rox-extra/rox-filer/desktop2appdir 
b/source/rox-extra/rox-filer/desktop2appdir
new file mode 100644
index 0000000..9af0a2e
--- /dev/null
+++ b/source/rox-extra/rox-filer/desktop2appdir
@@ -0,0 +1,50 @@
+#!/bin/sh
+# Warning: This shell script was written for frugalware, and will not work with
+# other distros. You have been warned.
+#
+
+printhelp()
+{
+       echo "Usage: `basename $0` [desktop file]"
+       exit 1
+}
+
+[ -z "$1" ] && printhelp
+if ! echo "$1" | grep -q '.desktop$'; then
+       printhelp
+fi
+if [ ! -f "$1" ]; then
+       echo "No such file or directory: $1"
+       exit 1
+fi
+
+EXEC=`grep '^Exec=' "$1" | sed 's|^Exec=\(.*\)|\1|' | gawk '{print $1}'`
+NAME=`grep '^Name=' "$1" | sed 's|^Name=\(.*\)|\1|'`
+COMMENT=`grep '^Comment=' "$1" | sed 's|^Comment=\(.*\)|\1|'`
+ICON=`grep '^Icon=' "$1" | sed 's|^Icon=\(.*\)|\1|'`
+ICON=`find -L /usr/share/pixmaps -name "$ICON*" | head -n1`
+OWNER=`pacman -Qo "$1" | gawk '{print $1}'`
+HELP=`find -L /usr/share/doc -name "$OWNER*" | head -n1`
+
+if [ ! -d "$PWD/$NAME" ]; then
+       mkdir -p "$PWD/$NAME"
+else
+       echo "The directory $PWD/$NAME must not exist."
+       exit 1
+fi
+
+cd "$PWD/$NAME"
+ln -sf "`which "$EXEC"`" AppRun           # symlink to executable
+[ -d "$HELP" ] && ln -s "$HELP" Help     # symlink system doc folder, if it 
exists
+[ -f "$ICON" ] && ln -s "$ICON" .DirIcon # symlink to system icon, if it exists
+echo -e "\
+<?xml version=\"1.0\"?>\n\
+<AppInfo>\n\
+  <Summary>$COMMENT</Summary>\n\
+  <About>\n\
+    <Purpose>$COMMENT</Purpose>\n\
+    <Version>`pacman -Qi "$OWNER" | grep 'Version.*:' | sed 's|^.*: 
\(.*\)|\1|'`</Version>\n\
+    <Homepage>`pacman -Qi "$OWNER" | grep 'URL.*:' | sed 's|^.*: 
\(.*\)|\1|'`</Homepage>\n\
+    <License>`pacman -Qi "$OWNER" | grep 'License.*:' | sed 's|^.*: 
\(.*\)|\1|'`</License>\n\
+  </About>\n\
+</AppInfo>" > AppInfo.xml
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to