+ shared-mime-info-2.0-1

Update to 2.0
This commit is contained in:
Bastien Nocera 2020-05-06 16:57:03 +02:00
parent 3102d15543
commit c8159e20af
5 changed files with 93 additions and 52 deletions

2
.gitignore vendored
View File

@ -19,3 +19,5 @@ shared-mime-info-0.71.tar.bz2
/shared-mime-info-1.13.1.tar.xz
/shared-mime-info-1.14.tar.xz
/shared-mime-info-1.15.tar.xz
/shared-mime-info-2.0.tar.xz
/xdgmime-6663a2288d11b37bc07f5a01b4b85dcd377787e1.tar.bz2

View File

@ -1,18 +1,18 @@
From 7bd867808aad05d691456a8301c8737ded9fd64b Mon Sep 17 00:00:00 2001
From dc15dd50b198b0b2a135abd16151206dd9acca75 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 25 Aug 2011 10:54:47 +0100
Subject: [PATCH] Remove sub-classing from OO.o mime-types
https://bugs.freedesktop.org/show_bug.cgi?id=40354
---
freedesktop.org.xml.in | 31 -------------------------------
data/freedesktop.org.xml.in | 31 -------------------------------
1 file changed, 31 deletions(-)
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in
index 29ed9ef..542f1f7 100644
--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -845,7 +845,6 @@ command to generate the output files.
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in
index 1c17b8d..ad464e1 100644
--- a/data/freedesktop.org.xml.in
+++ b/data/freedesktop.org.xml.in
@@ -877,7 +877,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.calc">
<comment>OpenOffice Calc spreadsheet</comment>
@ -20,7 +20,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -858,7 +857,6 @@ command to generate the output files.
@@ -890,7 +889,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.calc.template">
<comment>OpenOffice Calc template</comment>
@ -28,7 +28,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -871,7 +869,6 @@ command to generate the output files.
@@ -903,7 +901,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.draw">
<comment>OpenOffice Draw drawing</comment>
@ -36,7 +36,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="image-x-generic"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -884,7 +881,6 @@ command to generate the output files.
@@ -916,7 +913,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.draw.template">
<comment>OpenOffice Draw template</comment>
@ -44,7 +44,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="image-x-generic"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -897,7 +893,6 @@ command to generate the output files.
@@ -929,7 +925,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.impress">
<comment>OpenOffice Impress presentation</comment>
@ -52,7 +52,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-presentation"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -910,7 +905,6 @@ command to generate the output files.
@@ -942,7 +937,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.impress.template">
<comment>OpenOffice Impress template</comment>
@ -60,7 +60,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-presentation"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -923,7 +917,6 @@ command to generate the output files.
@@ -955,7 +949,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.math">
<comment>OpenOffice Math formula</comment>
@ -68,7 +68,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -936,7 +929,6 @@ command to generate the output files.
@@ -968,7 +961,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.writer">
<comment>OpenOffice Writer document</comment>
@ -76,7 +76,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -949,7 +941,6 @@ command to generate the output files.
@@ -981,7 +973,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.writer.global">
<comment>OpenOffice Writer global document</comment>
@ -84,7 +84,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -962,7 +953,6 @@ command to generate the output files.
@@ -994,7 +985,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.writer.template">
<comment>OpenOffice Writer template</comment>
@ -92,7 +92,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -977,7 +967,6 @@ command to generate the output files.
@@ -1009,7 +999,6 @@ command to generate the output files.
<comment>ODT document</comment>
<acronym>ODT</acronym>
<expanded-acronym>OpenDocument Text</expanded-acronym>
@ -100,7 +100,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -992,7 +981,6 @@ command to generate the output files.
@@ -1024,7 +1013,6 @@ command to generate the output files.
<comment>ODT document (Flat XML)</comment>
<acronym>FODT</acronym>
<expanded-acronym>OpenDocument Text (Flat XML)</expanded-acronym>
@ -108,7 +108,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-document"/>
<glob pattern="*.fodt"/>
</mime-type>
@@ -1000,7 +988,6 @@ command to generate the output files.
@@ -1032,7 +1020,6 @@ command to generate the output files.
<comment>ODT template</comment>
<acronym>ODT</acronym>
<expanded-acronym>OpenDocument Text</expanded-acronym>
@ -116,7 +116,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1015,7 +1002,6 @@ command to generate the output files.
@@ -1047,7 +1034,6 @@ command to generate the output files.
<comment>OTH template</comment>
<acronym>OTH</acronym>
<expanded-acronym>OpenDocument HTML</expanded-acronym>
@ -124,7 +124,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="text-html"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1030,7 +1016,6 @@ command to generate the output files.
@@ -1062,7 +1048,6 @@ command to generate the output files.
<comment>ODM document</comment>
<acronym>ODM</acronym>
<expanded-acronym>OpenDocument Master</expanded-acronym>
@ -132,7 +132,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1045,7 +1030,6 @@ command to generate the output files.
@@ -1077,7 +1062,6 @@ command to generate the output files.
<comment>ODG drawing</comment>
<acronym>ODG</acronym>
<expanded-acronym>OpenDocument Drawing</expanded-acronym>
@ -140,7 +140,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="image-x-generic"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1060,7 +1044,6 @@ command to generate the output files.
@@ -1092,7 +1076,6 @@ command to generate the output files.
<comment>ODG drawing (Flat XML)</comment>
<acronym>FODG</acronym>
<expanded-acronym>OpenDocument Drawing (Flat XML)</expanded-acronym>
@ -148,7 +148,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="image-x-generic"/>
<glob pattern="*.fodg"/>
</mime-type>
@@ -1068,7 +1051,6 @@ command to generate the output files.
@@ -1100,7 +1083,6 @@ command to generate the output files.
<comment>ODG template</comment>
<acronym>ODG</acronym>
<expanded-acronym>OpenDocument Drawing</expanded-acronym>
@ -156,7 +156,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="image-x-generic"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1083,7 +1065,6 @@ command to generate the output files.
@@ -1115,7 +1097,6 @@ command to generate the output files.
<comment>ODP presentation</comment>
<acronym>ODP</acronym>
<expanded-acronym>OpenDocument Presentation</expanded-acronym>
@ -164,7 +164,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-presentation"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1098,7 +1079,6 @@ command to generate the output files.
@@ -1130,7 +1111,6 @@ command to generate the output files.
<comment>ODP presentation (Flat XML)</comment>
<acronym>FODP</acronym>
<expanded-acronym>OpenDocument Presentation (Flat XML)</expanded-acronym>
@ -172,7 +172,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-presentation"/>
<glob pattern="*.fodp"/>
</mime-type>
@@ -1106,7 +1086,6 @@ command to generate the output files.
@@ -1138,7 +1118,6 @@ command to generate the output files.
<comment>ODP template</comment>
<acronym>ODP</acronym>
<expanded-acronym>OpenDocument Presentation</expanded-acronym>
@ -180,7 +180,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-presentation"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1121,7 +1100,6 @@ command to generate the output files.
@@ -1153,7 +1132,6 @@ command to generate the output files.
<comment>ODS spreadsheet</comment>
<acronym>ODS</acronym>
<expanded-acronym>OpenDocument Spreadsheet</expanded-acronym>
@ -188,7 +188,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1136,7 +1114,6 @@ command to generate the output files.
@@ -1168,7 +1146,6 @@ command to generate the output files.
<comment>ODS spreadsheet (Flat XML)</comment>
<acronym>FODS</acronym>
<expanded-acronym>OpenDocument Spreadsheet (Flat XML)</expanded-acronym>
@ -196,7 +196,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-spreadsheet"/>
<glob pattern="*.fods"/>
</mime-type>
@@ -1144,7 +1121,6 @@ command to generate the output files.
@@ -1176,7 +1153,6 @@ command to generate the output files.
<comment>ODS template</comment>
<acronym>ODS</acronym>
<expanded-acronym>OpenDocument Spreadsheet</expanded-acronym>
@ -204,7 +204,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1159,7 +1135,6 @@ command to generate the output files.
@@ -1191,7 +1167,6 @@ command to generate the output files.
<comment>ODC chart</comment>
<acronym>ODC</acronym>
<expanded-acronym>OpenDocument Chart</expanded-acronym>
@ -212,7 +212,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1174,7 +1149,6 @@ command to generate the output files.
@@ -1206,7 +1181,6 @@ command to generate the output files.
<comment>ODC template</comment>
<acronym>ODC</acronym>
<expanded-acronym>OpenDocument Chart</expanded-acronym>
@ -220,7 +220,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1189,7 +1163,6 @@ command to generate the output files.
@@ -1221,7 +1195,6 @@ command to generate the output files.
<comment>ODF formula</comment>
<acronym>ODF</acronym>
<expanded-acronym>OpenDocument Formula</expanded-acronym>
@ -228,7 +228,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1204,7 +1177,6 @@ command to generate the output files.
@@ -1236,7 +1209,6 @@ command to generate the output files.
<comment>ODF template</comment>
<acronym>ODF</acronym>
<expanded-acronym>OpenDocument Formula</expanded-acronym>
@ -236,7 +236,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1219,7 +1191,6 @@ command to generate the output files.
@@ -1251,7 +1223,6 @@ command to generate the output files.
<comment>ODB database</comment>
<acronym>ODB</acronym>
<expanded-acronym>OpenDocument Database</expanded-acronym>
@ -244,7 +244,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1235,7 +1206,6 @@ command to generate the output files.
@@ -1267,7 +1238,6 @@ command to generate the output files.
<comment>ODI image</comment>
<acronym>ODI</acronym>
<expanded-acronym>OpenDocument Image</expanded-acronym>
@ -252,7 +252,7 @@ index 29ed9ef..542f1f7 100644
<generic-icon name="image-x-generic"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1248,7 +1218,6 @@ command to generate the output files.
@@ -1280,7 +1250,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.openofficeorg.extension">
<comment>OpenOffice.org extension</comment>
@ -261,5 +261,5 @@ index 29ed9ef..542f1f7 100644
<glob pattern="*.oxt" />
</mime-type>
--
2.7.4
2.26.2

View File

@ -0,0 +1,22 @@
From 6bf9e4ff0fb7eff11a02bd937045bf5dc291841a Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Wed, 6 May 2020 16:48:47 +0200
Subject: [PATCH] data: Fix pkg-config installation path
---
data/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/data/meson.build b/data/meson.build
index 25ce031..e22b544 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -38,4 +38,5 @@ pkgconfig.generate(
name: 'shared-mime-info',
description: 'Freedesktop common MIME database',
version: meson.project_version(),
+ install_dir: get_option('datadir') / 'pkgconfig'
)
--
2.26.2

View File

@ -1,10 +1,10 @@
Summary: Shared MIME information database
Name: shared-mime-info
Version: 1.15
Release: 4%{?dist}
Version: 2.0
Release: 1%{?dist}
License: GPLv2+
URL: http://freedesktop.org/Software/shared-mime-info
Source0: https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/b27eb88e4155d8fccb8bb3cd12025d5b/shared-mime-info-1.15.tar.xz
Source0: https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/0440063a2e6823a4b1a6fb2f2af8350f/shared-mime-info-2.0.tar.xz
Source1: gnome-mimeapps.list
# Generated with:
# for i in `cat /home/hadess/Projects/jhbuild/totem/data/mime-type-list.txt | grep -v audio/flac | grep -v ^#` ; do if grep MimeType /home/hadess/Projects/jhbuild/rhythmbox/data/rhythmbox.desktop.in.in | grep -q "$i;" ; then echo "$i=org.gnome.Rhythmbox3.desktop;rhythmbox.desktop;org.gnome.Totem.desktop;" >> totem-defaults.list ; else echo "$i=org.gnome.Totem.desktop;" >> totem-defaults.list ; fi ; done ; for i in `cat /home/hadess/Projects/jhbuild/totem/data/uri-schemes-list.txt | grep -v ^#` ; do echo "x-scheme-handler/$i=org.gnome.Totem.desktop;" >> totem-defaults.list ; done
@ -19,14 +19,23 @@ Source4: eog-defaults.list
# for i in `grep MimeType= /usr/share/applications/org.gnome.Evince.desktop | sed 's/MimeType=//' | sed 's/;/ /g'` ; do echo $i=org.gnome.Evince.desktop\; >> evince-defaults.list ; done
Source5: evince-defaults.list
# Tarball for https://gitlab.freedesktop.org/xdg/xdgmime/-/tree/6663a2288d11b37bc07f5a01b4b85dcd377787e1
Source6: https://gitlab.freedesktop.org/xdg/xdgmime/-/archive/6663a2288d11b37bc07f5a01b4b85dcd377787e1/xdgmime-6663a2288d11b37bc07f5a01b4b85dcd377787e1.tar.bz2
# Work-around for https://bugs.freedesktop.org/show_bug.cgi?id=40354
Patch0: 0001-Remove-sub-classing-from-OO.o-mime-types.patch
# https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/80
Patch1: 0001-data-Fix-pkg-config-installation-path.patch
BuildRequires: gcc
BuildRequires: libxml2-devel
BuildRequires: xmlto
BuildRequires: glib2-devel
BuildRequires: gettext
BuildRequires: itstool
BuildRequires: meson
BuildRequires: git
# Disable pkgconfig autodep
%global __requires_exclude ^/usr/bin/pkg-config$
@ -40,20 +49,19 @@ a file. This is generally done by examining the file's name or contents,
and looking up the correct MIME type in a database.
%prep
%autosetup
%autosetup -S git
tar xjf %SOURCE6
mv xdgmime-*/ xdgmime/
%build
%configure \
--disable-silent-rules\
--disable-update-mimedb
# not smp safe, pretty small package anyway
cd ./xdgmime/
make
cd ..
%meson -Dupdate-mimedb=false -Dxdg-mime-path=./xdgmime/
%meson_build
%install
# speed build a bit
PKGSYSTEM_ENABLE_FSYNC=0 \
%make_install
%meson_install
find $RPM_BUILD_ROOT%{_datadir}/mime -type d \
| sed -e "s|^$RPM_BUILD_ROOT|%%dir |" > %{name}.files
@ -77,6 +85,8 @@ cp $RPM_BUILD_ROOT%{_datadir}/applications/gnome-mimeapps.list \
## translations are already in the xml file installed
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*
%check
%meson_test
%post
/bin/touch --no-create %{_datadir}/mime/packages &>/dev/null ||:
@ -89,7 +99,7 @@ update-mime-database -n %{_datadir}/mime &> /dev/null ||:
%files -f %{name}.files
%license COPYING
%doc README NEWS HACKING shared-mime-info-spec.xml
%doc README.md NEWS HACKING.md data/shared-mime-info-spec.xml
%{_bindir}/*
%{_datadir}/mime/packages/*
%{_datadir}/applications/mimeapps.list
@ -98,8 +108,14 @@ update-mime-database -n %{_datadir}/mime &> /dev/null ||:
%dir %{_datadir}/pkgconfig
%{_datadir}/pkgconfig/shared-mime-info.pc
%{_mandir}/man*/*
%{_datadir}/gettext/its/shared-mime-info.its
%{_datadir}/gettext/its/shared-mime-info.loc
%changelog
* Wed May 06 2020 Bastien Nocera <bnocera@redhat.com> - 2.0-1
+ shared-mime-info-2.0-1
- Update to 2.0
* Tue May 05 2020 Bastien Nocera <bnocera@redhat.com> - 1.15-4
+ shared-mime-info-1.15-4
- Update mime defaults (eog, totem, evince, file-roller)

View File

@ -1 +1,2 @@
SHA512 (shared-mime-info-1.15.tar.xz) = 3666aa500dfa6a28bd0524400c47fa16d90ae61f8c80f350fd895972319ec2f511618b8a7fa3cbde621edee46fde19e4506bda62f0bd2d0ede1b08d7bdb9aef2
SHA512 (xdgmime-6663a2288d11b37bc07f5a01b4b85dcd377787e1.tar.bz2) = 3dba3960edc4881df7ac0120c97ed2f69127365eac25b678df127c2febfaa9518e2e39b4e7713f44b131f8ce20b3100dc3676636bc705018e6ced3e9f7289875
SHA512 (shared-mime-info-2.0.tar.xz) = f4a1ea9a408ffcff325e57585dec5862405e9fd6c79e444048039f3061676501c40168cecf8935d002644a702a21f08f0f7c680ef6a65fdf188e0d892f3cc085