File OpenBoard.spec of Package OpenBoard

#
# spec file for package OpenBoard
#
# Copyright (c) 2016 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/
#


Name:           OpenBoard
%define         dest_dir %{_libdir}/%{name}
%define         namelc openboard
%define         fqname ch.%{namelc}.%{name}
Version:        1.6.1
Release:        1
Summary:        Interactive whiteboard for schools and universities
License:        GPL-3.0+
Group:          Amusements/Teaching/Other
Url:            http://openboard.ch
Source0:        https://github.com/OpenBoard-org/OpenBoard/archive/v%{version}.zip#/%{name}-%{version}.zip
Patch0:			0001-Rewrite-libs.pri.patch
Patch1:			0002-Install-to-correct-directories-on-linux.patch
Patch2:			0003-podcast.pri-port-to-pkgconfig.patch
Patch3:			0004-Use-QStandardPaths-to-locate-resources.patch
Patch4:			0005-Add-svg-icon.patch
Patch5:			0006-pro-Remove-UB_THIRDPARTY_INTERACTIVE.patch
Patch6:			0007-Linux-Only-use-onboard-by-default-if-it-s-installed.patch
Patch7:         0573-compile-with-poppler-22.03.patch
BuildRequires:  unzip
BuildRequires:  bison
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  ffmpeg-devel
BuildRequires:  libpaper-devel
%if 0%{?sle_version} > 150200 || 0%{?suse_version} > 1520
BuildRequires:  pkgconfig(quazip1-qt5)
%else
BuildRequires:  pkgconfig(quazip)
%endif
BuildRequires:  libtheora-devel libva-devel alsa-devel libSDL-devel
BuildRequires:  libvpx-devel libvorbis-devel libogg-devel libopus-devel libmp3lame-devel
BuildRequires:  libass-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Multimedia)
BuildRequires:  pkgconfig(Qt5MultimediaWidgets)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5UiTools)
BuildRequires:  pkgconfig(Qt5WebKit)
BuildRequires:  pkgconfig(Qt5WebKitWidgets)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRequires:  pkgconfig(Qt5XmlPatterns)
BuildRequires:  pkgconfig(libpulse-mainloop-glib)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(hunspell)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(poppler)

%description
OpenBoard is an open source cross-platform interactive white board
application designed primarily for use in schools. It was
originally forked from Open-Sankoré, which was itself based on
Uniboard.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1

%build
lrelease-qt5 %{name}.pro

export QMAKE_CXX_FLAGS="$QMAKE_CXX_FLAGS -fpermissive"
%qmake5 %{name}.pro
%make_jobs

%install
export INSTALL_ROOT=%{buildroot}
%make_install

%fdupes -s %{buildroot}

%files
%defattr(-,root,root,-)
%doc COPYRIGHT LICENSE
%{_datadir}/applications/%{fqname}.desktop
%{_datadir}/icons/hicolor/scalable
%{_datadir}/OpenBoard
%{_bindir}/%{namelc}

%changelog
openSUSE Build Service is sponsored by