forked from pool/desktop-file-utils
Accepting request 1080820 from home:gber:branches:X11:common:Factory
- suse-update-mime-defaults: * add support for MATE desktop * ensure C locale is set for sorting order * fix quoting of DESTDIR OBS-URL: https://build.opensuse.org/request/show/1080820 OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/desktop-file-utils?expand=0&rev=85
This commit is contained in:
parent
f86637a5fb
commit
a8139723e8
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 20 09:04:41 UTC 2023 - Guido Berhoerster <guido+opensuse@berhoerster.name>
|
||||||
|
|
||||||
|
- suse-update-mime-defaults:
|
||||||
|
* add support for MATE desktop
|
||||||
|
* ensure C locale is set for sorting order
|
||||||
|
* fix quoting of DESTDIR
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jun 24 07:32:30 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
|
Fri Jun 24 07:32:30 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package desktop-file-utils
|
# spec file for package desktop-file-utils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# suse-update-mime-defaults - create default application ordering for MIME associations
|
# suse-update-mime-defaults - create default application ordering for MIME associations
|
||||||
#
|
#
|
||||||
# Copyright (C) 2012 Guido Berhoerster <gber@opensuse.org>
|
# Copyright (C) 2023 Guido Berhoerster <guido+opensuse@berhoerster.name>
|
||||||
#
|
#
|
||||||
# Permission to use, copy, modify, and distribute this software for any
|
# Permission to use, copy, modify, and distribute this software for any
|
||||||
# purpose with or without fee is hereby granted, provided that the above
|
# purpose with or without fee is hereby granted, provided that the above
|
||||||
@ -16,28 +16,25 @@
|
|||||||
# TORTIOUS ACTION, ARISING OUT OF PERFORMANCE OF THIS SOFTWARE.
|
# TORTIOUS ACTION, ARISING OUT OF PERFORMANCE OF THIS SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
export LC_ALL=C
|
|
||||||
|
|
||||||
r=
|
r=
|
||||||
case $1 in
|
case $1 in
|
||||||
DESTDIR=* )
|
DESTDIR=*)
|
||||||
r=`echo "$1" | sed s/^DESTDIR=//`
|
r="${1#DESTDIR=}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# reset XDG_DATA_DIRS so it can be trusted
|
# reset XDG_DATA_DIRS so it can be trusted
|
||||||
unset XDG_DATA_DIRS
|
unset XDG_DATA_DIRS
|
||||||
if [ "${PROFILEREAD}" != "true" ]; then
|
if [ "${PROFILEREAD}" != "true" ]; then
|
||||||
. $r/etc/profile
|
. "$r/etc/profile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ensue the cache directory structure is in order
|
export LC_ALL=C
|
||||||
if [ ! -d $r/var/cache/gio-2.0 ]; then
|
|
||||||
mkdir -m 755 -p $r/var/cache/gio-2.0
|
|
||||||
fi
|
|
||||||
|
|
||||||
for desktop in gnome xfce lxde pantheon budgie; do
|
# ensure the cache directory structure is in order
|
||||||
|
mkdir -m 755 -p "$r/var/cache/gio-2.0"
|
||||||
|
|
||||||
|
for desktop in gnome xfce lxde pantheon budgie mate; do
|
||||||
awk -vdesktop=${desktop} '
|
awk -vdesktop=${desktop} '
|
||||||
# print a warning to stderr
|
# print a warning to stderr
|
||||||
function warn(msg, cmd) {
|
function warn(msg, cmd) {
|
||||||
@ -125,6 +122,8 @@ BEGIN {
|
|||||||
categories_list = "GTK"
|
categories_list = "GTK"
|
||||||
} else if (desktop == "budgie") {
|
} else if (desktop == "budgie") {
|
||||||
categories_list = "GTK"
|
categories_list = "GTK"
|
||||||
|
} else if (desktop == "mate") {
|
||||||
|
categories_list = "MATE,GTK"
|
||||||
}
|
}
|
||||||
split(categories_list, categories, /,/)
|
split(categories_list, categories, /,/)
|
||||||
root = ENVIRON["r"]
|
root = ENVIRON["r"]
|
||||||
@ -256,5 +255,5 @@ BEGIN {
|
|||||||
printf("%s=%s\n", mimetype, defaults_list[mimetype])
|
printf("%s=%s\n", mimetype, defaults_list[mimetype])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
' >$r/var/cache/gio-2.0/${desktop}-mimeapps.list
|
' >"$r/var/cache/gio-2.0/${desktop}-mimeapps.list"
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user