shared-mime-info/shared-mime-info.spec

91 lines
2.4 KiB
RPMSpec
Raw Normal View History

2020-07-31 15:01:16 +08:00
Name: shared-mime-info
2021-02-01 17:18:39 +08:00
Version: 2.1
Release: 1
2019-09-30 11:17:06 -04:00
Summary: Shared MIME information database
License: GPLv2+
URL: https://freedesktop.org/wiki/Software/shared-mime-info/
2021-02-01 17:18:39 +08:00
Source0: https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/0ee50652091363ab0d17e335e5e74fbe/shared-mime-info-2.1.tar.xz
Source1: mimeapps.list
2019-09-30 11:17:06 -04:00
2021-02-01 17:18:39 +08:00
Patch0: 0001-Remove-sub-classing-from-OO.o-mime-types.patch
2019-09-30 11:17:06 -04:00
2020-07-31 15:01:16 +08:00
BuildRequires: gcc libxml2-devel glib2-devel gettext intltool perl-XML-Parser meson itstool xmlto
2019-09-30 11:17:06 -04:00
%global __requires_exclude ^/usr/bin/pkg-config$
%description
The shared-mime-info package contains the core database of common types
and the update-mime-database command used to extend it. It requires
glib2 to be installed for building the update command. Additionally, it
uses intltool for translations, though this is only a dependency for
the maintainers.
%package_help
%prep
2020-07-31 15:01:16 +08:00
%autosetup -n %{name}-%{version} -p1
2019-09-30 11:17:06 -04:00
%build
2020-07-31 15:01:16 +08:00
#%%configure --disable-silent-rules --disable-update-mimedb
#make
%meson
%meson_build
2019-09-30 11:17:06 -04:00
%install
2020-07-31 15:01:16 +08:00
#PKGSYSTEM_ENABLE_FSYNC=0 \
#%%make_install
%meson_install
2019-09-30 11:17:06 -04:00
find $RPM_BUILD_ROOT%{_datadir}/mime -type d \
| sed -e "s|^$RPM_BUILD_ROOT|%%dir |" > %{name}.files
find $RPM_BUILD_ROOT%{_datadir}/mime -type f -not -path "*/packages/*" \
| sed -e "s|^$RPM_BUILD_ROOT|%%ghost |" >> %{name}.files
install -d $RPM_BUILD_ROOT%{_datadir}/applications
2021-02-01 17:18:39 +08:00
install -m 644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/applications/mimeapps.list
2019-09-30 11:17:06 -04:00
2020-07-31 15:01:16 +08:00
%check
%meson_test
2019-09-30 11:17:06 -04:00
%post
/bin/touch --no-create %{_datadir}/mime/packages &>/dev/null ||:
%transfiletriggerin -- %{_datadir}/mime
update-mime-database -n %{_datadir}/mime &> /dev/null ||:
%transfiletriggerpostun -- %{_datadir}/mime
update-mime-database -n %{_datadir}/mime &> /dev/null ||:
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/update-mime-database
%{_datadir}/applications/*.list
%{_datadir}/mime/packages/*.org.xml
%{_datadir}/pkgconfig/shared-mime-info.pc
2020-07-31 15:01:16 +08:00
%{_datadir}/gettext/*
2019-09-30 11:17:06 -04:00
%exclude %{_datadir}/locale/*
%files help
2020-07-31 15:01:16 +08:00
%doc README.md NEWS HACKING.md data/shared-mime-info-spec.xml
2019-09-30 11:17:06 -04:00
%{_mandir}/man1/*.gz
%changelog
2021-02-01 17:18:39 +08:00
* Mon Feb 1 2021 jinzhimin <jinzhimin2@huawei.com> - 2.1-1
- Upgrade to 2.1
2020-09-10 09:03:22 +08:00
* Thu Sep 10 2020 hanhui <hanhui15@huawei.com> - 2.0-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:modify source url
2020-07-31 15:01:16 +08:00
* Thu Jul 31 2020 chxssg<chxssg@qq.com> - 2.0-1
- Update to 2.0
2019-09-30 11:17:06 -04:00
* Tue Aug 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.10-4
- Package init