SHA256
1
0
forked from pool/xdg-utils
Jiri Slaby 2017-05-23 09:28:09 +00:00 committed by Git OBS Bridge
parent 70ab6ea880
commit 4002cab31c
9 changed files with 22 additions and 308 deletions

View File

@ -1,13 +1,13 @@
<services>
<service mode="localonly" name="tar_scm">
<service mode="disabled" name="tar_scm">
<param name="url">git://anongit.freedesktop.org/xdg/xdg-utils</param>
<param name="scm">git</param>
<param name="filename">xdg-utils</param>
<param name="versionformat">%ad</param>
<param name="versionformat">%cd</param>
</service>
<service mode="localonly" name="recompress">
<service mode="disabled" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service mode="localonly" name="set_version"/>
<service mode="disabled" name="set_version"/>
</services>

View File

@ -1,60 +0,0 @@
commit 6e4d88e740b89a2766312fb544e4a22b7034d9e3
Author: Simon Lees <sflees@suse.de>
Date: Tue May 31 13:13:53 2016 +0930
common: implement vendor dirs in desktop_file_to_binary
Index: xdg-utils-20160610/scripts/xdg-utils-common.in
===================================================================
--- xdg-utils-20160610.orig/scripts/xdg-utils-common.in
+++ xdg-utils-20160610/scripts/xdg-utils-common.in
@@ -50,7 +50,6 @@ binary_to_desktop_file()
#-------------------------------------------------------------
# map a .desktop file to a binary
-## FIXME: handle vendor dir case
desktop_file_to_binary()
{
search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
@@ -58,14 +57,33 @@ desktop_file_to_binary()
IFS=:
for dir in $search; do
unset IFS
- [ "$dir" ] && [ -d "$dir/applications" ] || continue
- file="$dir/applications/$desktop"
- [ -r "$file" ] || continue
- # Remove any arguments (%F, %f, %U, %u, etc.).
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- readlink -f "$command"
- return
+ [ "$dir" ] && [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue
+ # Check if desktop file contains -
+ if [ "${desktop#*-}" != "$desktop" ]; then
+ vendor=${desktop%-*}
+ app=${desktop#*-}
+ if [ -r $dir/applications/$vendor/$app ]; then
+ file_path=$dir/applications/$vendor/$app
+ elif [ -r $dir/applnk/$vendor/$app ]; then
+ file_path=$dir/applnk/$vendor/$app
+ fi
+ fi
+ if test -z "$file_path" ; then
+ for indir in "$dir"/applications/ "$dir"/applications/*/ "$dir"/applnk/ "$dir"/applnk/*/; do
+ file="$indir/$desktop"
+ if [ -r "$file" ]; then
+ file_path=$file
+ break
+ fi
+ done
+ fi
+ if [ -r "$file_path" ]; then
+ # Remove any arguments (%F, %f, %U, %u, etc.).
+ command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word`"
+ command="`which "$command"`"
+ readlink -f "$command"
+ return
+ fi
done
}

View File

@ -1,196 +0,0 @@
Index: xdg-utils-20160610/ChangeLog
===================================================================
--- xdg-utils-20160610.orig/ChangeLog
+++ xdg-utils-20160610/ChangeLog
@@ -1,5 +1,9 @@
=== xdg-utils 1.1.2 (unreleased) ===
+2016-08-25 Simon Lees <sflees@suse.de>
+ * Add support for LXQt
+ * Add enlightenment to xdg-email, xdg-settings
+
2016-06-10 Rex Dieter <rdieter@fedoraproject.org>
* xdg-open: prefer open_generic_xdg_x_scheme_handler over open_envvar (BR96472)
Index: xdg-utils-20160610/scripts/xdg-email.in
===================================================================
--- xdg-utils-20160610.orig/scripts/xdg-email.in
+++ xdg-utils-20160610/scripts/xdg-email.in
@@ -459,7 +459,7 @@ case "$DE" in
open_xfce "${mailto}"
;;
- generic)
+ generic|lxqt|enlightenment)
open_generic "${mailto}"
;;
Index: xdg-utils-20160610/scripts/xdg-open.in
===================================================================
--- xdg-utils-20160610.orig/scripts/xdg-open.in
+++ xdg-utils-20160610/scripts/xdg-open.in
@@ -488,7 +488,7 @@ case "$DE" in
open_xfce "$url"
;;
- lxde)
+ lxde|lxqt)
open_lxde "$url"
;;
Index: xdg-utils-20160610/scripts/xdg-settings.in
===================================================================
--- xdg-utils-20160610.orig/scripts/xdg-settings.in
+++ xdg-utils-20160610/scripts/xdg-settings.in
@@ -852,7 +852,7 @@ case "$DE" in
dispatch_specific xfce "$@"
;;
- generic)
+ generic|lxqt|enlightenment)
dispatch_specific generic "$@"
;;
Index: xdg-utils-20160610/scripts/xdg-su.in
===================================================================
--- xdg-utils-20160610.orig/scripts/xdg-su.in
+++ xdg-utils-20160610/scripts/xdg-su.in
@@ -78,6 +78,49 @@ su_gnome()
fi
}
+su_lxqt()
+{
+ LXQTSU=`which lxqt-sudo 2>/dev/null`
+ if [ $? -eq 0 ] ; then
+ if [ -z "$user" ] ; then
+ # -s option runs as su rather then sudo
+ $LXQTSU -s "$cmd"
+ else
+ # lxqt-sudo does not support specifying a user
+ su_generic
+ fi
+
+ if [ $? -eq 0 ]; then
+ exit_success
+ else
+ exit_failure_operation_failed
+ fi
+ else
+ su_generic
+ fi
+}
+
+su_enlightenment()
+{
+# Enlightenment doesn't have any reasonably working su/sudo graphical interface
+# but terminology works as a drop in replacement for xterm and has a matching theme
+ if which terminology >/dev/null ; then
+ if [ -z "$user" ] ; then
+ terminology -g 60x5 -T "xdg-su: $cmd" -e "su -c '$cmd'"
+ else
+ terminology -g 60x5 -T "xdg-su: $cmd" -e "su -c '$cmd' '$user'"
+ fi
+
+ if [ $? -eq 0 ]; then
+ exit_success
+ else
+ exit_failure_operation_failed
+ fi
+ else
+ su_generic
+ fi
+}
+
su_generic()
{
if [ -z "$user" ] ; then
@@ -167,6 +210,14 @@ case "$DE" in
su_xfce
;;
+ lxqt)
+ su_lxqt
+ ;;
+
+ enlightenment)
+ su_enlightenment
+ ;;
+
*)
[ x"$user" = x"" ] && user=root
exit_failure_operation_impossible "no graphical method available for invoking '$cmd' as '$user'"
Index: xdg-utils-20160610/scripts/xdg-terminal.in
===================================================================
--- xdg-utils-20160610.orig/scripts/xdg-terminal.in
+++ xdg-utils-20160610/scripts/xdg-terminal.in
@@ -176,6 +176,32 @@ terminal_lxde()
fi
}
+terminal_lxqt()
+{
+ if which qterminal &>/dev/null; then
+ if [ x"$1" = x"" ]; then
+ qterminal
+ else
+ qterminal -e "$1"
+ fi
+ else
+ terminal_generic "$1"
+ fi
+}
+
+terminal_enlightenment()
+{
+ if which terminology &>/dev/null; then
+ if [ x"$1" = x"" ]; then
+ terminology
+ else
+ terminology -e "$1"
+ fi
+ else
+ terminal_generic "$1"
+ fi
+}
+
#[ x"$1" != x"" ] || exit_failure_syntax
command=
@@ -232,6 +258,14 @@ case "$DE" in
terminal_lxde "$command"
;;
+ lxqt)
+ terminal_lxqt "$command"
+ ;;
+
+ enlightenment)
+ terminal_enlightenment "$command"
+ ;;
+
generic)
terminal_generic "$command"
;;
Index: xdg-utils-20160610/scripts/xdg-utils-common.in
===================================================================
--- xdg-utils-20160610.orig/scripts/xdg-utils-common.in
+++ xdg-utils-20160610/scripts/xdg-utils-common.in
@@ -273,6 +273,9 @@ detectDE()
LXDE)
DE=lxde;
;;
+ LXQt)
+ DE=lxqt;
+ ;;
MATE)
DE=mate;
;;
@@ -294,6 +297,7 @@ detectDE()
elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment;
+ elif [ x"$LXQT_SESSION_CONFIG" != x"" ]; then DE=mate;
fi
fi

View File

@ -1,36 +0,0 @@
commit 88deef3f4affa53680382540c2cd1ba9ce8e082d
Author: Simon Lees <sflees@suse.de>
Date: Fri Jun 3 16:45:08 2016 +0930
xdg-mime only return desktop file for existing apps
xdg-mime originally returned whatever was in the mimeapps.list
file, now it only returns the first desktop file that exists
and has a corrosponding binary that exists.
fdo#44163
Index: xdg-utils-20160520/scripts/xdg-mime.in
===================================================================
--- xdg-utils-20160520.orig/scripts/xdg-mime.in
+++ xdg-utils-20160520/scripts/xdg-mime.in
@@ -372,8 +372,17 @@ check_mimeapps_list()
}
' "$mimeapps_list" | cut -d ';' -f 1)
if [ -n "$result" ]; then
- echo "$result"
- exit_success
+ # $result could be a ; separated list of .desktop files
+ # use the first on the system
+ IFS=\;
+ for app in $result; do
+ IFS="$oldifs"
+ exists=$(desktop_file_to_binary "$app")
+ if [ -n "$exists" ]; then
+ echo "$app"
+ exit_success
+ fi
+ done
fi
fi
done

View File

@ -1,3 +1,9 @@
From: sor.alexei@meowr.ru
Subject: Fixes -x argument, which is the default for {gnome,mate}-terminal
References: fdo#93231
---
--- a/scripts/xdg-terminal.in
+++ b/scripts/xdg-terminal.in
@@ -65,11 +65,17 @@ terminal_gnome()

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d92a29242de41b0581f9743f043670997fd56fe521e5a57412056cc3c300a2d0
size 268452

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:033f6ef83305e2baf8ec969150c0fe63b2435e63b9f74558dd0234a2c5374c66
size 269336

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue May 23 09:23:49 UTC 2017 - jslaby@suse.com
- Update to 20170508
- removed common-vendor-dirs-in-desktop_to_binary.patch
- removed fix-enlightenment-lxqt-support.patch
- removed xdg-mime-return-existing-desktop-files.patch
-------------------------------------------------------------------
Tue Nov 15 00:26:14 UTC 2016 - sflees@suse.de

View File

@ -17,7 +17,7 @@
Name: xdg-utils
Version: 20160610
Version: 20170508
Release: 0
Summary: Utilities to uniformly interface desktop environments
License: MIT
@ -29,13 +29,8 @@ Source: xdg-utils-%{version}.tar.xz
Patch0: install-some-more-scripts.diff
# PATCH-FIX-UPSTREAM xdg-terminal-fix-gsettings.patch fdo#93231 ronisbr@gmail.com
Patch1: xdg-terminal-fix-gsettings.patch
# PATCH-FIX-UPSTREAM fix-enlightenment-support.patch fdo#88280 simon@simotek.net
Patch2: fix-enlightenment-lxqt-support.patch
# PATCH-FIX-UPSTREAM xdg-terminal-fix-terminal--x-arg.patch fdo#93231 sor.alexei@meowr.ru -- https://bugs.freedesktop.org/show_bug.cgi?id=93231#c5
Patch3: xdg-terminal-fix-terminal--x-arg.patch
# PATCH-FIX-UPSTREAM (2 patches) xdg-mime / xdg-open generic implementations only return 1 item sflees@suse.de (boo#979265)
Patch4: common-vendor-dirs-in-desktop_to_binary.patch
Patch5: xdg-mime-return-existing-desktop-files.patch
BuildRequires: make
# for xmlto to be able to generate text from html
BuildRequires: w3m
@ -72,10 +67,7 @@ This means that:
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
%configure