File tumbler.spec of Package tumbler

# spec file for package tumbler
# Copyright (c) 2012 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

%bcond_with libffmpegthumbnailer

%define libname libtumbler-1-0

Name:           tumbler
Version:        0.1.25
Release:        0
Summary:        Thumbnail Management for Xfce
License:        GPL-2.0+ and LGPL-2.1+
Group:          Productivity/Graphics/Other
BuildRequires:  intltool
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gmodule-2.0)
BuildRequires:  pkgconfig(gthread-2.0)
# GdkPibuxf thumbnailer plugin
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
# FreeType2 font thumbnailer plugin
BuildRequires:  freetype2-devel
# JPEG thumbnailer plugin with EXIF support
BuildRequires:  libjpeg-devel
%if %{with libffmpegthumbnailer}
# ffmpeg video thumbnailer plugin
BuildRequires:  pkgconfig(libffmpegthumbnailer)
# gstreamer video thumbnailer plugin
BuildRequires:  pkgconfig(gstreamer-0.10)
# poppler PDF/PS thumbnailer plugin
BuildRequires:  pkgconfig(poppler-glib)
# ODF thumbnailer plugin
BuildRequires:  pkgconfig(libgsf-1)
# libopenraw thumbnailer plugin
BuildRequires:  pkgconfig(libopenraw-gnome-1.0)
# cache plugin
BuildRequires:  pkgconfig(libpng)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Tumbler is a D-Bus service for applications to request thumbnails for various
URI schemes and MIME types. It is an implementation of the thumbnail management
D-Bus specification described on and
extensible through a plugin interface or via specialized thumbnailer services
implemented in accordance to the thumbnail management D-Bus specification.

%package -n %{libname}
Summary:        Tumbler Library
Group:          System/Libraries
Recommends:     %{name}-lang = %{version}

%description -n %{libname}
This package provides the shared library component of tumbler.

%package devel
Summary:        Development Files for tumbler
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Recommends:     %{name}-doc = %{version}

%description devel
This package contains the development files needed for developing tumbler

%package doc
Summary:        Developer Documentation for tumbler
Group:          Documentation/HTML
BuildArch:      noarch

%description doc
This package provides the developer documentation for tumbler.

%package lang
Summary:        Languages for package %{name}
Group:          System/Localization
Requires:       %{libname} = %{version}
Provides:       %{name}-lang-all = %{version}
Supplements:    packageand(bundle-lang-other:%{libname})
BuildArch:      noarch

%description lang
Provides translations to the package %{name}

%setup -q

%configure --disable-static
make %{?_smp_mflags} V=1


find %{buildroot}%{_libdir} -name '*.la' | xargs rm -f

rm -rf %{buildroot}%{_datadir}/locale/{ast,kk,tl_PH,ur_PK}

%find_lang %{name} %{?no_lang_C}

rm -rf %{buildroot}

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%dir %{_libdir}/tumbler-1
%dir %{_libdir}/tumbler-1/plugins
%dir %{_libdir}/tumbler-1/plugins/cache
%if %{with libffmpegthumbnailer}

%files -n %{libname}

%files lang  -f %{name}.lang

%files devel

%files doc
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%doc %{_datadir}/gtk-doc/html/tumbler