File drawpile.spec of Package drawpile

#
# spec file for package drawpile
#
# Copyright (c) 2018 SUSE LINUX 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/
#



%if 0%{?suse_version} > 1320
%define giflib 1
%endif
Name:           drawpile
Version:        2.0.10
Release:        0
Summary:        A collaborative drawing program
License:        GPL-3.0+
Group:          Productivity/Graphics/Other
Url:            http://drawpile.net/
Source:         http://drawpile.net/files/src/%{name}-%{version}.tar.gz
## PATCH Upstream to fix GCC -8 build commit bc06dce
Patch0:         userlistwidget.patch
BuildRequires:  cmake
BuildRequires:  update-desktop-files
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  karchive-devel
BuildRequires:  libqt5-linguist-devel
BuildRequires:  xdg-utils
BuildRequires:  libsodium-devel
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Multimedia)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(libmicrohttpd)
BuildRequires:  pkgconfig(libpng)
####Recommends packages####
BuildRequires:  kdnssd-framework-devel
BuildRequires:  libminiupnpc-devel
BuildRequires:  pkgconfig(libmicrohttpd)
BuildRequires:  pkgconfig(systemd)
%if 0%{?giflib}
BuildRequires:  giflib-devel
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
DrawPile is a sketching oriented drawing program with a twist:
you can share your drawing live with other users.
There are no restrictions on who may draw where; every user has full access
to the whole picture simultaneously.

Feature highlights:
	* Shared canvas using the built-in server or a dedicated server
	* Record, play back and export drawing sessions
	* Simple animation support
	* Layers and blending modes
	* Text layers
	* Supports pressure sensitive Wacom tablets
	* Built-in chat
	* Supports OpenRaster file format
	* Encrypted connections using SSL
	* Automatic port forwarding with UPnP

%prep
%setup -q
%patch0 -p0

%build
%cmake
make %{?_smp_mflags}

%install
%cmake_install
install -Dm644 {desktop/,%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/}%{name}.svg
install -Dm0644 {desktop/,%{buildroot}%{_datadir}/applications/}%{name}.desktop
%suse_update_desktop_file -r %{name} Qt Graphics RasterGraphics

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root,-)
%{_bindir}/%{name}*
%{_datadir}/%{name}/
%dir %{_datadir}/appdata/
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/icons/hicolor/*/apps/%{name}.svg
%{_datadir}/applications/%{name}.desktop
%{_datadir}/doc/%{name}/
%{_mandir}/man1/%{name}*.1*

%changelog