- Uninstall silently if update-mime-database is not present
(bsc#1231463). OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/shared-mime-info?expand=0&rev=109
This commit is contained in:
commit
df144ccc11
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
24
macros.shared-mime-info
Normal file
24
macros.shared-mime-info
Normal file
@ -0,0 +1,24 @@
|
||||
# RPM macros for packages installing a MIME type according to the XDG specification
|
||||
#
|
||||
###
|
||||
#
|
||||
# When a package installs a MIME type as per the XDG specification, it should
|
||||
# use both macros:
|
||||
#
|
||||
# - %mime_database_post in %post
|
||||
# - %mime_database_postun in %postun
|
||||
#
|
||||
# Note that these macros can optionally take as argument the directory
|
||||
# where the MIME type is installed. If no argument is passed, then
|
||||
# %{_datadir}/mime will be used (which is where applications usually install
|
||||
# the MIME type information).
|
||||
#
|
||||
###
|
||||
|
||||
# macros are place holders to not unnescessarily break packages; package converted to file triggers
|
||||
%mime_database_post() \
|
||||
%nil
|
||||
|
||||
# macros are place holders to not unnescessarily break packages; package converted to file triggers
|
||||
%mime_database_postun() \
|
||||
%nil
|
3
shared-mime-info-2.4.tar.bz2
Normal file
3
shared-mime-info-2.4.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:32dc32ae39ff1c1bf8434dd3b36770b48538a1772bc0298509d034f057005992
|
||||
size 7096347
|
1335
shared-mime-info.changes
Normal file
1335
shared-mime-info.changes
Normal file
File diff suppressed because it is too large
Load Diff
100
shared-mime-info.spec
Normal file
100
shared-mime-info.spec
Normal file
@ -0,0 +1,100 @@
|
||||
#
|
||||
# spec file for package shared-mime-info
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global __requires_exclude ^/usr/bin/pkg-config$
|
||||
Name: shared-mime-info
|
||||
Version: 2.4
|
||||
Release: 0
|
||||
Summary: Shared MIME Database
|
||||
License: GPL-2.0-or-later
|
||||
Group: System/X11/Utilities
|
||||
URL: https://gitlab.freedesktop.org/xdg/shared-mime-info
|
||||
Source0: %{url}/-/archive/%{version}/%{name}-%{version}.tar.bz2
|
||||
Source1: macros.shared-mime-info
|
||||
|
||||
%define usegcc13 0%{?sle_version} && 0%{?sle_version} < 160000
|
||||
|
||||
%if %usegcc13
|
||||
BuildRequires: gcc13-c++
|
||||
%else
|
||||
BuildRequires: c++_compiler
|
||||
%endif
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: libxml2-devel
|
||||
# needed for xmllint
|
||||
BuildRequires: libxml2-tools
|
||||
BuildRequires: meson
|
||||
BuildRequires: xmlto
|
||||
# libgio-2_0-0 Requires: shared-mime-info, but this can't exist yet. We explicitly ignore this dependency here.
|
||||
#!BuildIgnore: shared-mime-info
|
||||
# needed by update-mime-database
|
||||
Provides: %{name}-devel = %{version}-%{release}
|
||||
|
||||
%description
|
||||
This package contains:
|
||||
|
||||
- The freedesktop.org shared MIME database spec.
|
||||
|
||||
- The merged GNOME and KDE databases, in the new format.
|
||||
|
||||
- The update-mime-database command, used to install new MIME data.
|
||||
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%if %usegcc13
|
||||
export CC=gcc-13
|
||||
export CXX=g++-13
|
||||
%endif
|
||||
%meson
|
||||
%meson_build
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
%find_lang %{name} %{?no_lang_C}
|
||||
# Install rpm macros
|
||||
install -D -m644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.shared-mime-info
|
||||
|
||||
%check
|
||||
%meson_test
|
||||
|
||||
%filetriggerin -- %{_datadir}/mime
|
||||
export PKGSYSTEM_ENABLE_FSYNC=0
|
||||
%{_bindir}/update-mime-database "%{_datadir}/mime"
|
||||
|
||||
%filetriggerpostun -- %{_datadir}/mime
|
||||
export PKGSYSTEM_ENABLE_FSYNC=0
|
||||
[ -x %{_bindir}/update-mime-database ] || exit 0
|
||||
%{_bindir}/update-mime-database "%{_datadir}/mime"
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc NEWS README.md
|
||||
%{_bindir}/*
|
||||
%{_datadir}/mime/packages/*.xml
|
||||
%{_datadir}/pkgconfig/*.pc
|
||||
%{_datadir}/gettext/its/shared-mime-info.*
|
||||
%{_mandir}/man?/*%{ext_man}
|
||||
%{_rpmmacrodir}/macros.shared-mime-info
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user