File shutter.spec of Package shutter

#
# spec file for package shutter
#
# Copyright (c) 2017 SUSE LINUX 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.99.4
Release:        1.1
Summary:        Featureful screenshot tool
License:        GPL-3.0+
Group:          Productivity/Graphics/Other
Url:            https://launchpad.net/shutter
Source0:        %{name}-%{version}.tar.gz
Source1:        %{name}.rpmlintrc

BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files

Requires:       ImageMagick
Requires:       hicolor-icon-theme
Requires:       procps
Requires:       xdg-utils
Requires:       perl(Carp::Always)
Requires:       perl(File::BaseDir)
Requires:       perl(File::Copy::Recursive)
Requires:       perl(File::Which)
Requires:       perl(Glib)
Requires:       perl(Glib::Object::Introspection)
Requires:       perl(Gnome2::Canvas)
Requires:       perl(Gtk3)
Requires:       perl(Gtk3::ImageView)
Requires:       perl(GooCanvas2)
Requires:       perl(GooCanvas2::CairoTypes)
Requires:       libwnck-3-0
Requires:       pango
Requires:       perl(Image::ExifTool)
Requires:       perl(Image::Magick)
Requires:       perl(JSON)
Requires:       perl(JSON::MaybeXS)
Requires:       perl(LWP::UserAgent)
Requires:       perl(Locale::gettext)
Requires:       perl(Moo)
Requires:       perl(Net::DBus)
#Requires:		perl(Net::OAuth)
Requires:       perl(Number::Bytes::Human)
Requires:       perl(Path::Class)
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:       gnome-web-photo
Requires:       nautilus-sendto
Requires:       typelib-1_0-Wnck-3_0
Requires:       typelib(GdkPixdata)
Requires:       typelib(GooCanvas)

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%lang_package

%description
Shutter is a feature-rich screenshot program. You can take a screenshot of a
specific area, window, your whole screen, or even of a website - apply different
effects to it, draw on it to highlight points, and then upload to an image
hosting site, all within one window.

Shutter allows you to capture nearly anything on your screen without losing
control over your screenshots (tabbed interface).
You don't need to open an external graphics editor like GIMP, because Shutter
ships with its own built-in editor.

%prep
%setup -q

%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 .mo -files
make -f Makefile

# 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

# Remove .po files and directory
rm -rf %{buildroot}%{_datadir}/%{name}/resources/po

rm -f %{buildroot}%{_datadir}/applications/%{name}.desktop~
rm -f %{buildroot}%{_datadir}/applications/%{name}.desktop.orig

%fdupes %{buildroot}%{_datadir}/

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

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

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

%changelog
openSUSE Build Service is sponsored by