File gthumb.spec of Package gthumb

#
# spec file for package gthumb
#
# 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 http://bugs.opensuse.org/
#


Name:           gthumb
Version:        3.0.1
Release:        0
# FIXME: Add libchamplain BuildRequires once the map feature is considered stable.
Summary:        An Image Viewer and Browser for GNOME
License:        GPL-2.0+
Group:          Productivity/Graphics/Viewers
Url:            http://live.gnome.org/gthumb
Source:         http://download.gnome.org/sources/gthumb/3.0/%{name}-%{version}.tar.xz
# For web albums
BuildRequires:  bison
BuildRequires:  fdupes
# For web albums
BuildRequires:  flex
BuildRequires:  gcc-c++
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  intltool
BuildRequires:  libjpeg-devel
BuildRequires:  libtiff-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(clutter-1.0) >= 1.0.0
BuildRequires:  pkgconfig(clutter-gtk-1.0) >= 1.0.0
BuildRequires:  pkgconfig(exiv2) >= 0.21
BuildRequires:  pkgconfig(gio-unix-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gmodule-2.0)
BuildRequires:  pkgconfig(gnome-keyring-1) >= 3.2.0
BuildRequires:  pkgconfig(gsettings-desktop-schemas)
BuildRequires:  pkgconfig(gstreamer-0.10) >= 0.10
BuildRequires:  pkgconfig(gstreamer-interfaces-0.10)
BuildRequires:  pkgconfig(gthread-2.0)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.2.0
BuildRequires:  pkgconfig(ice)
BuildRequires:  pkgconfig(libbrasero-burn3) >= 3.2.0
BuildRequires:  pkgconfig(libopenraw-1.0) >= 0.0.8
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(librsvg-2.0) >= 2.34.0
BuildRequires:  pkgconfig(libsoup-gnome-2.4) >= 2.36.0
BuildRequires:  pkgconfig(sm) >= 1.0.0
BuildRequires:  pkgconfig(zlib)
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

%description
gThumb lets you browse your hard disk, showing you thumbnails of image
files. It also lets you view single files (including GIF animations),
add comments to images, organize images in catalogs, print images, view
slide shows, set your desktop background, and more.

%package devel
Summary:        An Image Viewer and Browser for GNOME - Development Files
Group:          Productivity/Graphics/Viewers
Requires:       %{name} = %{version}

%description devel
gThumb lets you browse your hard disk, showing you thumbnails of image
files. It also lets you view single files (including GIF animations),
add comments to images, organize images in catalogs, print images, view
slide shows, set your desktop background, and more.

%lang_package
%prep
%setup -q
translation-update-upstream

%build
%configure\
	--disable-scrollkeeper\
	--disable-static \
        --enable-libopenraw \
        --with-smclient=xsmp
make %{?_smp_mflags}

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
# Change sr@Latn to sr@latin
mv %{buildroot}%{_datadir}/locale/sr@Latn %{buildroot}%{_datadir}/locale/sr@latin
%suse_update_desktop_file gthumb
%suse_update_desktop_file gthumb-import
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%if 0%{?suse_version} > 1130

%post
%desktop_database_post
%icon_theme_cache_post
%glib2_gsettings_schema_post
%endif

%if 0%{?suse_version} > 1130

%postun
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun
%endif

%files
%defattr(-, root, root)
# TODO is empty
%doc AUTHORS ChangeLog COPYING MAINTAINERS NEWS README
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%{_bindir}/gthumb
%{_libdir}/gthumb/
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/gthumb.png
%{_datadir}/icons/hicolor/*/apps/gthumb.svg
%{_datadir}/gthumb/
%{_datadir}/GConf/gsettings/gthumb.convert
%{_datadir}/glib-2.0/schemas/org.gnome.gthumb.*.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.gthumb.enums.xml
%{_datadir}/glib-2.0/schemas/org.gnome.gthumb.gschema.xml
%{_mandir}/man1/gthumb.1%{?ext_man}

%files devel
%defattr(-, root, root)
%{_includedir}/gthumb-3.0/
%{_datadir}/aclocal/gthumb.m4
%{_libdir}/pkgconfig/*.pc

%files lang -f %{name}.lang

%changelog