File shared-mime-info.spec of Package shared-mime-info

#
# spec file for package shared-mime-info
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#

# norootforbuild


Name:           shared-mime-info
BuildRequires:  glib2-devel
BuildRequires:  intltool
BuildRequires:  libxml2-devel
BuildRequires:  translation-update-upstream
Version:        0.90
Release:        4
Url:            http://freedesktop.org/wiki/Software/shared-mime-info
Group:          System/X11/Utilities
License:        GPLv2+
Summary:        Shared MIME Database
Source:         %{name}-%{version}.tar.bz2
Source1:        mime-info-to-mime
Source2:        macros.shared-mime-info
# PATCH-FIX-UPSTREAM shared-mime-info-fix-parallel-build.patch fdo#32127 vuntz@opensuse.org -- Fix parallel build, patch taken from upstream git.
Patch0:         shared-mime-info-fix-parallel-build.patch
# needed by mime-info-to-mime:
Requires:       /bin/rm /bin/mkdir /usr/bin/fgrep
# needed by update-mime-database
PreReq:         libxml2 libglib-2_0-0
Provides:       %{name}-devel = %{version}-%{release}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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.

%prep
%setup -q
translation-update-upstream
%patch0 -p1

%build
%configure
make

%install
%makeinstall
install %{S:1} $RPM_BUILD_ROOT%{_bindir}/
%find_lang %{name}
# Install rpm macros
install -D -m644 %{S:2} %{buildroot}%{_sysconfdir}/rpm/macros.shared-mime-info

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{_bindir}/update-mime-database %{_datadir}/mime || true

%files -f %{name}.lang
%defattr (-, root, root)
%doc COPYING ChangeLog NEWS README
%{_bindir}/*
%{_datadir}/mime/packages/*.xml
%{_datadir}/pkgconfig/*.pc
%ghost %{_datadir}/mime/[a-ms-vxX]*
%{_mandir}/man?/*.*
%{_sysconfdir}/rpm/macros.shared-mime-info

%changelog
openSUSE Build Service is sponsored by