2007-01-07 23:34:31 +00:00
#
2011-02-19 11:38:32 +00:00
# spec file for package desktop-file-utils
2007-01-07 23:34:31 +00:00
#
2023-04-20 11:16:47 +00:00
# Copyright (c) 2023 SUSE LLC
2007-01-07 23:34:31 +00:00
#
2009-06-18 15:09:08 +00:00
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2019-05-15 06:53:11 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2007-01-07 23:34:31 +00:00
#
Name : desktop-file-utils
2020-08-16 22:23:30 +00:00
Version : 0.26
2011-12-20 15:31:46 +00:00
Release : 0
2010-09-10 13:03:30 +00:00
Summary : Utilities for Manipulating Desktop Files
2018-03-05 08:51:58 +00:00
License : GPL-2.0-or-later
2007-01-07 23:34:31 +00:00
Group : Development/Tools/Other
2020-08-16 22:23:30 +00:00
URL : https://www.freedesktop.org/wiki/Software/desktop-file-utils
2011-12-20 15:31:46 +00:00
Source0 : http://www.freedesktop.org/software/desktop-file-utils/releases/%{name} -%{version} .tar.xz
2012-10-02 07:27:58 +00:00
Source1 : suse-update-mime-defaults
2010-10-10 13:21:16 +00:00
Source2 : macros.desktop-file-utils
2020-08-16 22:23:30 +00:00
Source3 : install_man.py
2010-09-10 13:03:30 +00:00
# PATCH-FEATURE-OPENSUSE desktop-file-utils-suse-keys.patch vuntz@opensuse.org -- Handle SUSE-specific keys in validator. This is not strictly necessary, since they are prefixed with X-, but we can verify that the value has the right type.
2010-02-19 12:03:00 +00:00
Patch0 : desktop-file-utils-suse-keys.patch
2020-08-16 22:23:30 +00:00
# PATCH-FIX-OPENSUSE install_man_desktop-file-edit_as_symlink.patch -- With Source3 makes manual page "desktop-file-edit.1" a symlink instead of a copy.
Patch1 : install_man_desktop-file-edit_as_symlink.patch
2022-06-28 08:44:57 +00:00
# PATCH-FIX-UPSTREAM -- SingleMainWindow is present in xdg-specs 1.5 and can be used by both GNOME and KDE
Patch2 : 0001-validate-support-SingleMainWindow-key-from-1.5.patch
Patch3 : 0002-validate-Support-version-1.5.patch
2010-09-10 13:03:30 +00:00
BuildRequires : glib2-devel
2020-08-16 22:23:30 +00:00
BuildRequires : meson >= 0.49.0
BuildRequires : pkgconfig
2019-05-15 06:53:11 +00:00
#!BuildIgnore: dbus-1-x11
2019-08-08 16:36:17 +00:00
# We need explicit requirement here, as these are required by
# %%filetriggerin that could be started early during the installation
# process.
2010-02-19 12:03:00 +00:00
Requires : aaa_base
2018-03-05 08:51:58 +00:00
Requires : awk
Requires : coreutils
2007-01-07 23:34:31 +00:00
%description
2009-08-28 23:05:50 +00:00
This packages contains a couple of command line utilities for
working with desktop files.
2007-01-07 23:34:31 +00:00
2009-08-28 23:05:50 +00:00
More information about desktop files can be found at:
http://freedesktop.org/wiki/Specifications/desktop-entry-spec
2007-01-07 23:34:31 +00:00
%prep
2020-08-16 22:23:30 +00:00
%autosetup -p1
cp %{SOURCE3} man/install_man.py
2007-01-07 23:34:31 +00:00
%build
2020-08-16 22:23:30 +00:00
%meson
%meson_build
2007-01-07 23:34:31 +00:00
%install
2020-08-16 22:23:30 +00:00
%meson_install
2012-10-02 07:27:58 +00:00
# Install suse-update-mime-defaults
install -m0755 %{SOURCE1} %{buildroot} %{_bindir} /suse-update-mime-defaults
2010-10-10 13:21:16 +00:00
# Install rpm macros
2019-05-15 06:53:11 +00:00
install -D -m644 %{SOURCE2} %{buildroot} %{_rpmmacrodir} /macros.desktop-file-utils
2007-01-07 23:34:31 +00:00
# Create ghosts based on default $XDG_DATA_DIRS:
2010-09-10 13:03:30 +00:00
mkdir -p %{buildroot} %{_datadir} /applications
touch %{buildroot} %{_datadir} /applications/mimeinfo.cache
2007-01-07 23:34:31 +00:00
2017-06-30 12:15:06 +00:00
%filetriggerin -- %{_datadir} /applications
%{_bindir} /update-desktop-database --quiet %{_datadir} /applications || true
%{_bindir} /suse-update-mime-defaults || true
%filetriggerpostun -- %{_datadir} /applications
2019-08-08 16:37:10 +00:00
if test -x %{_bindir} /update-desktop-database ; then
%{_bindir} /update-desktop-database --quiet %{_datadir} /applications || true
%{_bindir} /suse-update-mime-defaults || true
2019-08-08 16:36:17 +00:00
fi
2010-10-10 13:21:16 +00:00
2007-01-07 23:34:31 +00:00
%files
2019-05-15 06:53:11 +00:00
%license COPYING
%doc AUTHORS ChangeLog NEWS README
2011-12-20 15:31:46 +00:00
%{_bindir} /desktop-file-edit
2010-09-10 13:03:30 +00:00
%{_bindir} /desktop-file-install
%{_bindir} /desktop-file-validate
2012-10-02 07:27:58 +00:00
%{_bindir} /suse-update-mime-defaults
2010-09-10 13:03:30 +00:00
%{_bindir} /update-desktop-database
%ghost %{_datadir} /applications/mimeinfo.cache
2020-08-16 22:23:30 +00:00
%{_mandir} /man1/desktop-file-edit.1%{?ext_man}
%{_mandir} /man1/desktop-file-install.1%{?ext_man}
%{_mandir} /man1/desktop-file-validate.1%{?ext_man}
%{_mandir} /man1/update-desktop-database.1%{?ext_man}
2009-08-28 23:05:50 +00:00
# Own directories to not require emacs installed.
%dir %{_datadir} /emacs
%dir %{_datadir} /emacs/site-lisp
2007-01-16 16:14:07 +00:00
%{_datadir} /emacs/site-lisp/*.el*
2019-05-15 06:53:11 +00:00
%{_rpmmacrodir} /macros.desktop-file-utils
2008-03-10 16:45:17 +00:00
2007-02-25 22:22:18 +00:00
%changelog