From 9b6113c713cf4255adbc45b6aa0cd5e13d0b31471b7a6789291e1a4680f29cb7 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Thu, 12 Mar 2015 21:15:17 +0000 Subject: [PATCH] Accepting request 290298 from home:scarabeus_iv:branches:X11:common:Factory - Cleanup with spec-cleaner - Update suse-update-mime-defaults to search subfolders for desktop files by changing to find from simple ls bnc#867135 OBS-URL: https://build.opensuse.org/request/show/290298 OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/desktop-file-utils?expand=0&rev=46 --- desktop-file-utils.changes | 7 +++++++ desktop-file-utils.spec | 13 ++++++------- suse-update-mime-defaults | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/desktop-file-utils.changes b/desktop-file-utils.changes index e6c35d1..99bdc9f 100644 --- a/desktop-file-utils.changes +++ b/desktop-file-utils.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Mar 10 15:17:27 UTC 2015 - tchvatal@suse.com + +- Cleanup with spec-cleaner +- Update suse-update-mime-defaults to search subfolders for desktop + files by changing to find from simple ls bnc#867135 + ------------------------------------------------------------------- Mon Dec 15 00:09:35 UTC 2014 - stefan.bruens@rwth-aachen.de diff --git a/desktop-file-utils.spec b/desktop-file-utils.spec index 6df868a..d1c0ed3 100644 --- a/desktop-file-utils.spec +++ b/desktop-file-utils.spec @@ -1,7 +1,7 @@ # # spec file for package desktop-file-utils # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -35,10 +35,9 @@ Patch2: U_add-Cinnamon-desktop-environment_50271fe.patch Patch3: U_add-EDE-desktop-environment_97d6ba3.patch BuildRequires: glib2-devel BuildRequires: pkg-config -#!BuildIgnore: dbus-1-x11 -# Only needed because we don't (and won't) support building xz tarballs by default... See bnc#697467 BuildRequires: xz Requires: aaa_base +#!BuildIgnore: dbus-1-x11 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -50,7 +49,7 @@ http://freedesktop.org/wiki/Specifications/desktop-entry-spec %prep %setup -q -%patch0 -p0 +%patch0 %patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -58,10 +57,10 @@ http://freedesktop.org/wiki/Specifications/desktop-entry-spec %build %configure \ --with-lispdir=%{_datadir}/emacs/site-lisp -%__make %{?_smp_mflags} +make %{?_smp_mflags} %install -%makeinstall +make DESTDIR=%{buildroot} install %{?_smp_mflags} # we don't want to buildrequire emacs, but recent automake make it # impossible to install a lisp file without emacs installed. So we # manually do it. @@ -70,7 +69,7 @@ install -D -m644 misc/desktop-entry-mode.el %{buildroot}%{_datadir}/emacs/site-l # Install suse-update-mime-defaults install -m0755 %{SOURCE1} %{buildroot}%{_bindir}/suse-update-mime-defaults # Install rpm macros -install -D -m644 %{S:2} %{buildroot}%{_sysconfdir}/rpm/macros.desktop-file-utils +install -D -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/rpm/macros.desktop-file-utils # Create ghosts based on default $XDG_DATA_DIRS: mkdir -p %{buildroot}%{_datadir}/applications touch %{buildroot}%{_datadir}/applications/mimeinfo.cache diff --git a/suse-update-mime-defaults b/suse-update-mime-defaults index 7256f7e..f4b1dab 100644 --- a/suse-update-mime-defaults +++ b/suse-update-mime-defaults @@ -141,7 +141,7 @@ BEGIN { for (i = split("XDG_DATA_DIRS" in ENVIRON ? ENVIRON["XDG_DATA_DIRS"] : \ "/usr/local/share:/usr/share", xdg_data_dirs, /:/); i > 0; i--) { # XDG_DATA_DIRS is trusted here because it has been reset - cmd = "ls -1 -- \"" root xdg_data_dirs[i] "/applications/\"*.desktop " \ + cmd = "find \"" root xdg_data_dirs[i] "/applications/\" -name \"*.desktop\" " \ "2>/dev/null" while ((cmd | getline desktopfile) > 0) { l = split(desktopfile, arr, "/")