shared-mime-info/shared-mime-info.spec
Dominique Leuenberger 01f89cad3e Accepting request 155668 from home:dimstar:branches:GNOME:Factory
- Update to version 1.1:
  + Many mime-type changes
  + Specification changes:
    - Fix mimetype names used as examples.
    - Document that the first extension is the main one.
    - Fix missing plural.
  + Honor NOCONFIGURE=1.
  + Allow builders to not run make check by default.
  + Fix build for platforms with executable extensions.
  + Disable checks when cross compiling.
  + Use non-installed update-mime-database in install-data-hook.
  + Use native update-mime-database for install when cross
    compiling.
  + Add a local-test target to print mime in.
- Pass --disable-default-make-check to configure: we prefer to
  execute make check in the separate %check section.
- Add a %check section and execute make check

OBS-URL: https://build.opensuse.org/request/show/155668
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/shared-mime-info?expand=0&rev=37
2013-02-19 20:16:29 +00:00

97 lines
2.8 KiB
RPMSpec

#
# spec file for package shared-mime-info
#
# Copyright (c) 2013 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/
#
Name: shared-mime-info
Version: 1.1
Release: 0
Url: http://freedesktop.org/wiki/Software/shared-mime-info
Summary: Shared MIME Database
License: GPL-2.0+
Group: System/X11/Utilities
Source: http://people.freedesktop.org/~hadess/%{name}-%{version}.tar.xz
Source1: mime-info-to-mime
Source2: macros.shared-mime-info
BuildRequires: glib2-devel
BuildRequires: intltool
BuildRequires: libxml2-devel
# needed for xmllint
BuildRequires: libxml2-tools
BuildRequires: translation-update-upstream
# Only needed because we don't (and won't) support building xz tarballs by default... See bnc#697467
BuildRequires: xz
# needed by mime-info-to-mime:
Requires: /bin/mkdir
Requires: /bin/rm
Requires: /usr/bin/fgrep
# 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
PreReq: libxml2-2 libglib-2_0-0
Provides: %{name}-devel = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Recommends: %{name}-lang
%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
%setup -q
translation-update-upstream
%build
%configure \
--disable-default-make-check
make
%install
%makeinstall
install %{S:1} $RPM_BUILD_ROOT%{_bindir}/
%find_lang %{name} %{?no_lang_C}
# Install rpm macros
install -D -m644 %{S:2} %{buildroot}%{_sysconfdir}/rpm/macros.shared-mime-info
%check
make check
%clean
rm -rf $RPM_BUILD_ROOT
%post
%{_bindir}/update-mime-database %{_datadir}/mime || true
%files
%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
%files lang -f %{name}.lang
%changelog