File shutter.spec of Package shutter

#
# spec file for package shutter
#
# Copyright (c) 2011 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.87.3
Release:        1
License:        GPL 3
Summary:        Featureful screenshot tool
Url:            http://shutter-project.org/
Group:          Productivity/Graphics/Other
Source0:        %{name}-%{version}.tar.bz2
Source1:        README.openSUSE
Requires:       ImageMagick
Requires:       gnome-web-photo
Requires:       perl-gettext
Requires:       perl(Glib)
Requires:       perl-Gnome2
Requires:       perl-Gnome2-Canvas
Requires:       perl-Gnome2-GConf
Requires:       perl-Gnome2-VFS
Requires:       perl-Gnome2-Wnck
Requires:       perl-Goo-Canvas
Requires:       perl-Gtk2
Requires:       perl-Gtk2-ImageView
Requires:       perl-Gtk2-Unique
Requires:       perl-HTML-Form
Requires:       perl-HTML-FormHandler
Requires:       perl-Net-DBus
Requires:       perl-PerlMagick
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:       %{name}-lang = %{version}
BuildRequires:  perl-Gtk2-Unique
BuildRequires:  fdupes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%if 0%{?suse_version} >= 1110
BuildRequires:  update-desktop-files
%endif
#Requires:       nautilus-sendto
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
cp %{S:1} .
rm -rf share/shutter/resources/modules/{Proc,File,Net,Sort,X11}

%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 a Folder in docdir and move all relevant content to it
%{__install} -d -m 755 %{buildroot}%{_docdir}/%{name}
%{__cp} -pfr share/doc/%{name}/* %{buildroot}%{_docdir}/%{name}
%{__cp} %{S:1} %{buildroot}%{_docdir}/%{name}

# Create Datadir Folder
%{__install} -d -m 755 %{buildroot}%{_datadir}
%{__install} -d -m 755 %{buildroot}%{_datadir}/applications
%{__install} -d -m 755 %{buildroot}%{_datadir}/icons
%{__install} -d -m 755 %{buildroot}%{_datadir}/locale
%{__install} -d -m 755 %{buildroot}%{_datadir}/man
%{__install} -d -m 755 %{buildroot}%{_datadir}/pixmaps
%{__install} -d -m 755 %{buildroot}%{_datadir}/%{name}
%{__cp} -pfr share/applications/* %{buildroot}%{_datadir}/applications
%{__cp} -pfr share/icons/* %{buildroot}%{_datadir}/icons
%{__cp} -pfr share/locale/* %{buildroot}%{_datadir}/locale
%{__cp} -pfr share/man/* %{buildroot}%{_mandir}
%{__cp} -pfr share/pixmaps/* %{buildroot}%{_datadir}/pixmaps
%{__cp} -pfr share/%{name}/* %{buildroot}%{_datadir}/%{name}

%suse_update_desktop_file -r %{name} Utility DesktopUtility

%find_lang %{name} --all-name
%fdupes -s %{buildroot}

%clean
rm -rf %{buildroot}

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

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

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

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

%changelog
openSUSE Build Service is sponsored by