Remove locale files rather than exclude them
(cherry picked from commit 4e9ec93d8a80a23682b2b203cd93910ec9c21494)
This commit is contained in:
parent
3face457a1
commit
50cb09511f
23
0002-Fix-build-with-libxml2-2.12.0.patch
Normal file
23
0002-Fix-build-with-libxml2-2.12.0.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From c918fe77e255150938e83a6aec259f153d303573 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Faure <faure@kde.org>
|
||||||
|
Date: Sun, 19 Nov 2023 11:18:11 +0100
|
||||||
|
Subject: [PATCH] Fix build with libxml2-2.12.0 and clang-17
|
||||||
|
|
||||||
|
Fixes #219
|
||||||
|
---
|
||||||
|
src/test-subclassing.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/test-subclassing.c b/src/test-subclassing.c
|
||||||
|
index dd099e44..0758164f 100644
|
||||||
|
--- a/src/test-subclassing.c
|
||||||
|
+++ b/src/test-subclassing.c
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
#include <libxml/tree.h>
|
||||||
|
+#include <libxml/parser.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
||||||
@ -1,15 +1,19 @@
|
|||||||
Name: shared-mime-info
|
Name: shared-mime-info
|
||||||
Version: 2.4
|
Version: 2.4
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Shared MIME information database
|
Summary: Shared MIME information database
|
||||||
License: GPLv2+
|
License: GPL-2.0-or-later
|
||||||
URL: https://freedesktop.org/wiki/Software/shared-mime-info/
|
URL: https://freedesktop.org/wiki/Software/shared-mime-info/
|
||||||
Source0: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/%{version}/shared-mime-info-%{version}.tar.gz
|
Source0: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/%{version}/shared-mime-info-%{version}.tar.gz
|
||||||
Source1: mimeapps.list
|
Source1: mimeapps.list
|
||||||
|
|
||||||
Patch0: 0001-Remove-sub-classing-from-OO.o-mime-types.patch
|
Patch0: 0001-Remove-sub-classing-from-OO.o-mime-types.patch
|
||||||
|
Patch1: 0002-Fix-build-with-libxml2-2.12.0.patch
|
||||||
|
|
||||||
BuildRequires: gcc gcc-c++ libxml2-devel glib2-devel gettext intltool perl-XML-Parser meson itstool xmlto
|
BuildRequires: gcc gcc-c++ gettext intltool perl-XML-Parser meson itstool xmlto
|
||||||
|
BuildRequires: pkgconfig(gio-2.0)
|
||||||
|
BuildRequires: pkgconfig(glib-2.0) >= 2.6.0
|
||||||
|
BuildRequires: pkgconfig(libxml-2.0) >= 2.4
|
||||||
|
|
||||||
%global __requires_exclude ^/usr/bin/pkg-config$
|
%global __requires_exclude ^/usr/bin/pkg-config$
|
||||||
|
|
||||||
@ -40,6 +44,10 @@ find $RPM_BUILD_ROOT%{_datadir}/mime -type f -not -path "*/packages/*" \
|
|||||||
install -d $RPM_BUILD_ROOT%{_datadir}/applications
|
install -d $RPM_BUILD_ROOT%{_datadir}/applications
|
||||||
install -m 644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/applications/mimeapps.list
|
install -m 644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/applications/mimeapps.list
|
||||||
|
|
||||||
|
# remove bogus translation files
|
||||||
|
# translations are already in the xml file installed
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%meson_test
|
%meson_test
|
||||||
|
|
||||||
@ -53,20 +61,26 @@ update-mime-database -n %{_datadir}/mime &> /dev/null ||:
|
|||||||
update-mime-database -n %{_datadir}/mime &> /dev/null ||:
|
update-mime-database -n %{_datadir}/mime &> /dev/null ||:
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_bindir}/update-mime-database
|
%{_bindir}/update-mime-database
|
||||||
%{_datadir}/applications/*.list
|
%{_datadir}/applications/*.list
|
||||||
%{_datadir}/mime/packages/*.org.xml
|
%{_datadir}/mime/packages/*.org.xml
|
||||||
|
%dir %{_datadir}/pkgconfig
|
||||||
%{_datadir}/pkgconfig/shared-mime-info.pc
|
%{_datadir}/pkgconfig/shared-mime-info.pc
|
||||||
%{_datadir}/gettext/*
|
%dir %{_datadir}/gettext
|
||||||
%exclude %{_datadir}/locale/*
|
%dir %{_datadir}/gettext/its
|
||||||
|
%{_datadir}/gettext/its/shared-mime-info.its
|
||||||
|
%{_datadir}/gettext/its/shared-mime-info.loc
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%doc README.md NEWS HACKING.md data/shared-mime-info-spec.xml
|
%doc README.md NEWS HACKING.md data/shared-mime-info-spec.xml
|
||||||
%{_mandir}/man1/*.gz
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 07 2024 Funda Wang <fundawang@yeah.net> - 2.4-2
|
||||||
|
- Remove locale files rather than exclude them
|
||||||
|
- fix build with libxml 2.12
|
||||||
|
|
||||||
* Fri Feb 02 2024 zhouwenpei <zhouwenpei1@h-partners.com> - 2.4-1
|
* Fri Feb 02 2024 zhouwenpei <zhouwenpei1@h-partners.com> - 2.4-1
|
||||||
- Upgrade to 2.4
|
- Upgrade to 2.4
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user