File f-spot.spec of Package f-spot

#
# spec file for package f-spot
#
# 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:           f-spot
Version:        0.8.2
Release:        0
Summary:        GNOME Photo Management Application
License:        GPL-2.0+
Group:          Productivity/Graphics/Viewers
Url:            http://www.gnome.org/projects/f-spot/
Source:         %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM f-spot-mono-recent-gtk-sharp.patch vuntz@opensuse.org -- Fix build with recent gtk-sharp, taken from git
Patch2:         f-spot-mono-recent-gtk-sharp.patch
# PATCH-FIX-UPSTREAM fspot-mono.patch idoenmez@suse.de -- Add a workaround to compile with new Mono
Patch3:         fspot-mono.patch
# PATCH-FIX-UPSTREAM flickrnet-3.0.patch idoenmez@suse.de -- Add Flickrnet 3.0 API support
Patch4:         flickrnet-3.0.patch
BuildRequires:  fdupes
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  gnome-screensaver
BuildRequires:  gtk-sharp2-gapi
BuildRequires:  intltool
BuildRequires:  libexif-devel
BuildRequires:  libjpeg-devel
BuildRequires:  liblcms-devel
BuildRequires:  mono-basic
BuildRequires:  mono-data-sqlite
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(flickrnet)
BuildRequires:  pkgconfig(gconf-2.0)
BuildRequires:  pkgconfig(gconf-sharp-2.0)
BuildRequires:  pkgconfig(glib-sharp-2.0)
BuildRequires:  pkgconfig(gnome-keyring-sharp-1.0)
BuildRequires:  pkgconfig(gnome-sharp-2.0)
BuildRequires:  pkgconfig(gtk-sharp-2.0)
BuildRequires:  pkgconfig(libgnomeui-2.0)
BuildRequires:  pkgconfig(mono)
BuildRequires:  pkgconfig(mono-addins)
BuildRequires:  pkgconfig(ndesk-dbus-glib-1.0)
BuildRequires:  pkgconfig(unique-1.0)
Requires:       brasero
Requires:       dbus-1-x11
Requires:       dcraw
Requires:       mono-core
Recommends:     %{name}-lang
Provides:       %{name}-devel = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq

%description
F-Spot is a full-featured personal photo management application for the
GNOME desktop.

F-Spot simplifies digital photography by providing intuitive tools to
help you share, touch-up, find and organize your images.

%lang_package
%prep
%setup -q
#translation-update-upstream
%if 0%{?suse_version} >= 1140
%patch2 -p1
%endif
%patch3 -p1
%if 0%{?suse_version} >= 1230
%patch4 -p1
%endif

%build
export CFLAGS="%{optflags} -fstack-protector -fno-strict-aliasing"
%configure\
    --libexecdir=%{_libexecdir}/f-spot \
    --disable-schemas-install \
    --disable-scrollkeeper
make %{?_smp_mflags}

%install
%makeinstall
%find_lang %{name} %{?no_lang_C}
%find_gconf_schemas
%suse_update_desktop_file -C "Organize digital photographs" -G "Photo Browser" -N "F-Spot" %{name}
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/screensavers/f-spot-screensaver.desktop
%suse_update_desktop_file f-spot-import
%suse_update_desktop_file f-spot-view
rm %{buildroot}%{_libdir}/*/*.*a
# Not sure if this is TRT...
%__rm -rf %{buildroot}%{_libdir}/gio-sharp-unstable
%__rm -rf %{buildroot}%{_libdir}/pkgconfig/gio-sharp-unstable.pc
%fdupes -s %{buildroot}

%pre -f %{name}.schemas_pre

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%if 0%{?suse_version} > 1130

%post
%desktop_database_post
%icon_theme_cache_post
%endif

%if 0%{?suse_version} > 1130

%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif

%files -f %{name}.schemas_list
%defattr(-, root, root)
%doc AUTHORS NEWS README COPYING
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%{_bindir}/*
%{_libdir}/f-spot
%{_datadir}/applications/*.desktop
%dir %{_datadir}/applications/screensavers
%{_datadir}/applications/screensavers/*.desktop
%{_datadir}/icons/hicolor/*/*/*.*
%{_datadir}/f-spot
%{_libdir}/pkgconfig/*.pc
%{_libexecdir}/gnome-screensaver/f-spot-screensaver

%files lang -f %{name}.lang
%defattr(-, root, root)
%define __find_provides env sh -c 'filelist=($(grep -v -E "%{_libdir}/%{name}/extensions|Mono.Addins")) && { printf "%s\\n" "${filelist[@]}" | %{_prefix}/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | %{_bindir}/mono-find-provides ; } | sort | uniq || echo ""'

%changelog
openSUSE Build Service is sponsored by