From c8159e20af54edfe15b6d2777817ef6f17607170 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 6 May 2020 16:57:03 +0200 Subject: [PATCH] + shared-mime-info-2.0-1 Update to 2.0 --- .gitignore | 2 + ...ve-sub-classing-from-OO.o-mime-types.patch | 76 +++++++++---------- ...ata-Fix-pkg-config-installation-path.patch | 22 ++++++ shared-mime-info.spec | 42 ++++++---- sources | 3 +- 5 files changed, 93 insertions(+), 52 deletions(-) create mode 100644 0001-data-Fix-pkg-config-installation-path.patch diff --git a/.gitignore b/.gitignore index bcfa869..3956a99 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/0001-Remove-sub-classing-from-OO.o-mime-types.patch b/0001-Remove-sub-classing-from-OO.o-mime-types.patch index dc31a7a..48516d9 100644 --- a/0001-Remove-sub-classing-from-OO.o-mime-types.patch +++ b/0001-Remove-sub-classing-from-OO.o-mime-types.patch @@ -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 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. OpenOffice Calc spreadsheet @@ -20,7 +20,7 @@ index 29ed9ef..542f1f7 100644 -@@ -858,7 +857,6 @@ command to generate the output files. +@@ -890,7 +889,6 @@ command to generate the output files. OpenOffice Calc template @@ -28,7 +28,7 @@ index 29ed9ef..542f1f7 100644 -@@ -871,7 +869,6 @@ command to generate the output files. +@@ -903,7 +901,6 @@ command to generate the output files. OpenOffice Draw drawing @@ -36,7 +36,7 @@ index 29ed9ef..542f1f7 100644 -@@ -884,7 +881,6 @@ command to generate the output files. +@@ -916,7 +913,6 @@ command to generate the output files. OpenOffice Draw template @@ -44,7 +44,7 @@ index 29ed9ef..542f1f7 100644 -@@ -897,7 +893,6 @@ command to generate the output files. +@@ -929,7 +925,6 @@ command to generate the output files. OpenOffice Impress presentation @@ -52,7 +52,7 @@ index 29ed9ef..542f1f7 100644 -@@ -910,7 +905,6 @@ command to generate the output files. +@@ -942,7 +937,6 @@ command to generate the output files. OpenOffice Impress template @@ -60,7 +60,7 @@ index 29ed9ef..542f1f7 100644 -@@ -923,7 +917,6 @@ command to generate the output files. +@@ -955,7 +949,6 @@ command to generate the output files. OpenOffice Math formula @@ -68,7 +68,7 @@ index 29ed9ef..542f1f7 100644 -@@ -936,7 +929,6 @@ command to generate the output files. +@@ -968,7 +961,6 @@ command to generate the output files. OpenOffice Writer document @@ -76,7 +76,7 @@ index 29ed9ef..542f1f7 100644 -@@ -949,7 +941,6 @@ command to generate the output files. +@@ -981,7 +973,6 @@ command to generate the output files. OpenOffice Writer global document @@ -84,7 +84,7 @@ index 29ed9ef..542f1f7 100644 -@@ -962,7 +953,6 @@ command to generate the output files. +@@ -994,7 +985,6 @@ command to generate the output files. OpenOffice Writer template @@ -92,7 +92,7 @@ index 29ed9ef..542f1f7 100644 -@@ -977,7 +967,6 @@ command to generate the output files. +@@ -1009,7 +999,6 @@ command to generate the output files. ODT document ODT OpenDocument Text @@ -100,7 +100,7 @@ index 29ed9ef..542f1f7 100644 -@@ -992,7 +981,6 @@ command to generate the output files. +@@ -1024,7 +1013,6 @@ command to generate the output files. ODT document (Flat XML) FODT OpenDocument Text (Flat XML) @@ -108,7 +108,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1000,7 +988,6 @@ command to generate the output files. +@@ -1032,7 +1020,6 @@ command to generate the output files. ODT template ODT OpenDocument Text @@ -116,7 +116,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1015,7 +1002,6 @@ command to generate the output files. +@@ -1047,7 +1034,6 @@ command to generate the output files. OTH template OTH OpenDocument HTML @@ -124,7 +124,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1030,7 +1016,6 @@ command to generate the output files. +@@ -1062,7 +1048,6 @@ command to generate the output files. ODM document ODM OpenDocument Master @@ -132,7 +132,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1045,7 +1030,6 @@ command to generate the output files. +@@ -1077,7 +1062,6 @@ command to generate the output files. ODG drawing ODG OpenDocument Drawing @@ -140,7 +140,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1060,7 +1044,6 @@ command to generate the output files. +@@ -1092,7 +1076,6 @@ command to generate the output files. ODG drawing (Flat XML) FODG OpenDocument Drawing (Flat XML) @@ -148,7 +148,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1068,7 +1051,6 @@ command to generate the output files. +@@ -1100,7 +1083,6 @@ command to generate the output files. ODG template ODG OpenDocument Drawing @@ -156,7 +156,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1083,7 +1065,6 @@ command to generate the output files. +@@ -1115,7 +1097,6 @@ command to generate the output files. ODP presentation ODP OpenDocument Presentation @@ -164,7 +164,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1098,7 +1079,6 @@ command to generate the output files. +@@ -1130,7 +1111,6 @@ command to generate the output files. ODP presentation (Flat XML) FODP OpenDocument Presentation (Flat XML) @@ -172,7 +172,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1106,7 +1086,6 @@ command to generate the output files. +@@ -1138,7 +1118,6 @@ command to generate the output files. ODP template ODP OpenDocument Presentation @@ -180,7 +180,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1121,7 +1100,6 @@ command to generate the output files. +@@ -1153,7 +1132,6 @@ command to generate the output files. ODS spreadsheet ODS OpenDocument Spreadsheet @@ -188,7 +188,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1136,7 +1114,6 @@ command to generate the output files. +@@ -1168,7 +1146,6 @@ command to generate the output files. ODS spreadsheet (Flat XML) FODS OpenDocument Spreadsheet (Flat XML) @@ -196,7 +196,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1144,7 +1121,6 @@ command to generate the output files. +@@ -1176,7 +1153,6 @@ command to generate the output files. ODS template ODS OpenDocument Spreadsheet @@ -204,7 +204,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1159,7 +1135,6 @@ command to generate the output files. +@@ -1191,7 +1167,6 @@ command to generate the output files. ODC chart ODC OpenDocument Chart @@ -212,7 +212,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1174,7 +1149,6 @@ command to generate the output files. +@@ -1206,7 +1181,6 @@ command to generate the output files. ODC template ODC OpenDocument Chart @@ -220,7 +220,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1189,7 +1163,6 @@ command to generate the output files. +@@ -1221,7 +1195,6 @@ command to generate the output files. ODF formula ODF OpenDocument Formula @@ -228,7 +228,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1204,7 +1177,6 @@ command to generate the output files. +@@ -1236,7 +1209,6 @@ command to generate the output files. ODF template ODF OpenDocument Formula @@ -236,7 +236,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1219,7 +1191,6 @@ command to generate the output files. +@@ -1251,7 +1223,6 @@ command to generate the output files. ODB database ODB OpenDocument Database @@ -244,7 +244,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1235,7 +1206,6 @@ command to generate the output files. +@@ -1267,7 +1238,6 @@ command to generate the output files. ODI image ODI OpenDocument Image @@ -252,7 +252,7 @@ index 29ed9ef..542f1f7 100644 -@@ -1248,7 +1218,6 @@ command to generate the output files. +@@ -1280,7 +1250,6 @@ command to generate the output files. OpenOffice.org extension @@ -261,5 +261,5 @@ index 29ed9ef..542f1f7 100644 -- -2.7.4 +2.26.2 diff --git a/0001-data-Fix-pkg-config-installation-path.patch b/0001-data-Fix-pkg-config-installation-path.patch new file mode 100644 index 0000000..e694928 --- /dev/null +++ b/0001-data-Fix-pkg-config-installation-path.patch @@ -0,0 +1,22 @@ +From 6bf9e4ff0fb7eff11a02bd937045bf5dc291841a Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +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 + diff --git a/shared-mime-info.spec b/shared-mime-info.spec index bf6a680..009e2f6 100644 --- a/shared-mime-info.spec +++ b/shared-mime-info.spec @@ -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 - 2.0-1 ++ shared-mime-info-2.0-1 +- Update to 2.0 + * Tue May 05 2020 Bastien Nocera - 1.15-4 + shared-mime-info-1.15-4 - Update mime defaults (eog, totem, evince, file-roller) diff --git a/sources b/sources index 6fd3895..47fd6e1 100644 --- a/sources +++ b/sources @@ -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