File shutter.spec of Package shutter-wayland

#
# 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/
#


%define _name   shutter
Name:           shutter-on-wayland
Version:        0.99.4
Release:        0
Summary:        The feature-rich screenshot tool
License:        GPL-3.0+
Group:          Productivity/Graphics/Other
Url:            http://shutter-project.org/
Source0:        https://github.com/shutter-project/shutter/archive/refs/tags/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
Requires:       %{name}-lang = %{version}
Requires:       ImageMagick
Requires:       hicolor-icon-theme
Requires:       librsvg-2-2
Requires:       procps
Requires:       xdg-utils
Requires:       librsvg
Requires:       libwnck-3-0
Requires:       typelib-1_0-Wnck-3_0
Requires:       goocanvas2
Requires:       typelib-1_0-GooCanvas-2_0
Requires:       perl(File::BaseDir)
Requires:       perl(File::Spec)
Requires:       perl(File::Copy::Recursive)
Requires:       perl(File::Which)
Requires:       perl(Glib)
Requires:       perl(Glib::Object::Introspection)
Requires:       perl(Gtk3)
Requires:       perl(Gtk3::ImageView)
Requires:       perl(Image::Magick)
Requires:       perl(JSON)
Requires:       perl(JSON::MaybeXS)
Requires:       perl(LWP::UserAgent)
Requires:       perl(Locale::gettext)
Requires:       perl(Net::DBus)
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:       perl(Number::Bytes::Human)
Requires:       perl(Carp::Always)
Requires:       perl(GooCanvas2)
Requires:       perl(GooCanvas2::CairoTypes)
Requires:       perl(Pango)
Recommends:     gnome-web-photo
Recommends:     nautilus-sendto
Recommends:     libappindicator3-1
Recommends:     perl(Image::ExifTool)
Recommends:     perl(Net::Oauth)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%lang_package

%description
Shutter is a feature-rich screenshot program for Linux based operating systems such as Ubuntu.
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 is free, open-source, and licensed under GPL v3.

%prep
%autosetup

%build
make all
mkdir -p share/doc/shutter
cp -pfr README share/doc/shutter/
cp -pfr COPYING share/doc/shutter/

%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 %{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)
%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%{ext_man}
%dir %{_datadir}/appdata/
%{_datadir}/appdata/shutter.appdata.xml

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

%changelog
openSUSE Build Service is sponsored by