Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/shared-mime-info.git#977fbbad9f4dbd0d9a08228ef527a7086027bdab
This commit is contained in:
DistroBaker 2020-11-09 16:49:06 +00:00
parent b793b26228
commit f0b0b76056

View File

@ -1,7 +1,7 @@
Summary: Shared MIME information database Summary: Shared MIME information database
Name: shared-mime-info Name: shared-mime-info
Version: 2.0 Version: 2.0
Release: 4%{?dist} Release: 5%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://freedesktop.org/Software/shared-mime-info URL: http://freedesktop.org/Software/shared-mime-info
Source0: https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/0440063a2e6823a4b1a6fb2f2af8350f/shared-mime-info-2.0.tar.xz Source0: https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/0440063a2e6823a4b1a6fb2f2af8350f/shared-mime-info-2.0.tar.xz
@ -23,8 +23,9 @@ BuildRequires: xmlto
BuildRequires: glib2-devel BuildRequires: glib2-devel
BuildRequires: gettext BuildRequires: gettext
BuildRequires: itstool BuildRequires: itstool
BuildRequires: make
BuildRequires: meson BuildRequires: meson
BuildRequires: git BuildRequires: git-core
# Disable pkgconfig autodep # Disable pkgconfig autodep
%global __requires_exclude ^/usr/bin/pkg-config$ %global __requires_exclude ^/usr/bin/pkg-config$
@ -38,15 +39,15 @@ a file. This is generally done by examining the file's name or contents,
and looking up the correct MIME type in a database. and looking up the correct MIME type in a database.
%prep %prep
%autosetup -S git %autosetup -S git_am
tar xjf %SOURCE6 tar xjf %SOURCE6
mv xdgmime-*/ xdgmime/ mv xdgmime-*/ xdgmime/
%build %build
cd ./xdgmime/ %make_build -C xdgmime
make # the updated mimedb is later owned as %%ghost to ensure proper file-ownership
cd .. # it also asserts it is possible to build it
%meson -Dupdate-mimedb=false -Dxdg-mime-path=./xdgmime/ %meson -Dupdate-mimedb=true -Dxdg-mime-path=./xdgmime/
%meson_build %meson_build
%install %install
@ -57,14 +58,12 @@ find $RPM_BUILD_ROOT%{_datadir}/mime -type d \
find $RPM_BUILD_ROOT%{_datadir}/mime -type f -not -path "*/packages/*" \ find $RPM_BUILD_ROOT%{_datadir}/mime -type f -not -path "*/packages/*" \
| sed -e "s|^$RPM_BUILD_ROOT|%%ghost |" >> %{name}.files | sed -e "s|^$RPM_BUILD_ROOT|%%ghost |" >> %{name}.files
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications
install -m 644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/applications/mimeapps.list
# Support fallback/generic mimeapps.list (currently based on an old version of # Support fallback/generic mimeapps.list (currently based on an old version of
# gnome-mimeapps.list), see: # gnome-mimeapps.list), see:
# https://lists.fedoraproject.org/pipermail/devel/2015-July/212403.html # https://lists.fedoraproject.org/pipermail/devel/2015-July/212403.html
# https://bugzilla.redhat.com/show_bug.cgi?id=1243049 # https://bugzilla.redhat.com/show_bug.cgi?id=1243049
cp %SOURCE1 $RPM_BUILD_ROOT%{_datadir}/applications/mimeapps.list mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications
install -m 644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/applications/mimeapps.list
## remove bogus translation files ## remove bogus translation files
## translations are already in the xml file installed ## translations are already in the xml file installed
@ -85,17 +84,21 @@ update-mime-database -n %{_datadir}/mime &> /dev/null ||:
%files -f %{name}.files %files -f %{name}.files
%license COPYING %license COPYING
%doc README.md NEWS HACKING.md data/shared-mime-info-spec.xml %doc README.md NEWS HACKING.md data/shared-mime-info-spec.xml
%{_bindir}/* %{_bindir}/update-mime-database
%{_datadir}/mime/packages/* %{_datadir}/mime/packages/*
%{_datadir}/applications/mimeapps.list %{_datadir}/applications/mimeapps.list
# better to co-own this dir than to pull in pkgconfig # better to co-own this dir than to pull in pkgconfig
%dir %{_datadir}/pkgconfig %dir %{_datadir}/pkgconfig
%{_datadir}/pkgconfig/shared-mime-info.pc %{_datadir}/pkgconfig/shared-mime-info.pc
%{_mandir}/man*/* %{_mandir}/man*/update-mime-database.*
%{_datadir}/gettext/its/shared-mime-info.its %{_datadir}/gettext/its/shared-mime-info.its
%{_datadir}/gettext/its/shared-mime-info.loc %{_datadir}/gettext/its/shared-mime-info.loc
%changelog %changelog
* Sun Nov 8 2020 Miro Hrončok <mhroncok@redhat.com> - 2.0-5
- Own the generated files (as %%ghosts)
- Fixes: rhbz#1486468
* Tue Aug 25 2020 Bastien Nocera <bnocera@redhat.com> - 2.0-4 * Tue Aug 25 2020 Bastien Nocera <bnocera@redhat.com> - 2.0-4
+ shared-mime-info-2.0-4 + shared-mime-info-2.0-4
- Remove GNOME specific defaults apps list, move to gnome-desktop3 - Remove GNOME specific defaults apps list, move to gnome-desktop3