File shutter.spec of Package shutter

#
# spec file for package shutter
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 8/2011 - now by open-slx GmbH <Sascha.Manns@open-slx.de>
# Copyright (c) 12/2010 - 7/2011 by Sascha Manns <saigkill@opensuse.org>  
# Copyright (c) 7/2010 - 12/2010 by Ray Chen <swyear@gmail.com>
#
# 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:           shutter
Version:        0.90
Release:        0
Summary:        Featureful screenshot tool
License:        GPL-3.0
Group:          Productivity/Graphics/Other
Url:            http://shutter-project.org/
Source0:        %{name}-%{version}.tar.bz2
Source1:        README.openSUSE
Patch0:         desktop-shortcut-fix.diff
Patch2:         remove-provide-dropbox.diff
Requires:       %{name}-lang = %{version}
Requires:       ImageMagick
Requires:       hicolor-icon-theme
Requires:       perl-File-BaseDir
Requires:       perl-File-Copy-Recursive
Requires:       perl-File-Which
Requires:       perl-Gnome2
Requires:       perl-Gnome2-Canvas
Requires:       perl-Gnome2-VFS
Requires:       perl-Gnome2-Wnck
Requires:       perl-Gtk2
Requires:       perl-Gtk2-ImageView
Requires:       perl-Gtk2-Unique
Requires:       perl-JSON
Requires:       perl-JSON-XS
Requires:       perl-Net-DBus
Requires:       perl-Path-Class
Requires:       perl-PathTools
Requires:       perl-PerlMagick
Requires:       perl-Proc-ProcessTable
Requires:       perl-Proc-Simple
Requires:       perl-Sort-Naturally
Requires:       perl-WWW-Mechanize
Requires:       perl-X11-Protocol
Requires:       perl-XML-Simple
Requires:       perl-gettext
Requires:       perl-libwww-perl
Requires:       procps
Requires:       xdg-utils
Requires:       perl(Glib)
#Recommends:     nautilus-sendto
Recommends:     perl-Image-ExifTool
Recommends:     perl-Goo-Canvas
Recommends:     gnome-web-photo
Recommends:     perl-Net-DBus-GLib
Recommends:     perl-Net-Dropbox-API
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%lang_package

%description
Shutter is a GTK+ 2.0 screenshot application written in perl.
Shutter covers all features of common command line tools like
scrot or import and adds reasonable new features combined
with a comfortable GUI using the GTK+ 2.0 framework

Authors:
--------
   Mario Kemper <mario.kemper@googlemail.com> and Shutter Team

%prep
%setup -q
%patch0 
%patch2
cp %{S:1} share/doc/shutter

%build

%install
# Creating the Folder for Binary and Data. Copy the Bin into Bindir
%{__install} -d -m 0755 -p %{buildroot}%{_bindir}
%{__install} -m 755 bin/%{name} %{buildroot}%{_bindir}

# Create Datadir Folder
%{__install} -d -m 755 %{buildroot}%{_datadir}/
%{__cp} -pfr share/* %{buildroot}%{_datadir}/

%suse_update_desktop_file -r %{name} Utility DesktopUtility

%find_lang %{name} --all-name

rm -f ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop~

%fdupes %{buildroot}%{_datadir}/

%clean
rm -rf %{buildroot}

%post
update-desktop-database %{_datadir}/applications &>/dev/null || :
gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :

%postun
update-desktop-database %{_datadir}/applications &>/dev/null || :

%files
%defattr(-,root,root)
%doc %{_datadir}/doc/%{name}/*
%dir %{_datadir}/%{name}
%dir %{_datadir}/doc/%{name}
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/*
%{_datadir}/pixmaps/*
%{_datadir}/%{name}/*
%{_mandir}/man1/%{name}.1.gz

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by