File clementine-qt5.spec of Package clementine-qt5

# spec file for package clementine-qt5
# 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

%define rtime 1568884805
%define rhash 88131ec5f
%define version_path 99
Name:           clementine
Version:        1.3.%{version_path}.git.%{rtime}.%{rhash}
Release:        0
Summary:        A cross-platform Music Player based on Amarok 1.4
License:        GPL-3.0+
Group:          Productivity/Multimedia/Sound/Players
Source0:        %{name}-%{version}.tar.xz
# Patch fix factory build, add -fPIC to moodbar build
Patch3:         clementine-moodbar-fpic.patch
Patch6:         use_system_qxtglobalshortcut.patch
Patch7:         deviceview_2_line_text_color.patch
# PATCH-FIX-UPSTREAM revert queue changes
Patch17:        revert_gst_queue.patch
# PATCH-FIX-UPSTREAM Fix memory leaks in database
Patch18:        6375.patch
# PATCH-FIX-UPSTREAM Fix memory leaks
Patch19:        6376.patch
# PATCH-FIX-UPSTREAM Fix ratings not saved to file tag (Fix #6385)
Patch20:        6386.patch
# PATCH-FIX-UPSTREAM Fix misc. source comment typos
Patch21:        6393.patch
%if 0%{?suse_version} > 1325
BuildRequires:  libboost_headers-devel
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
BuildRequires:  gettext-tools
BuildRequires:  help2man
BuildRequires:  hicolor-icon-theme
BuildRequires:  libindicator-devel
BuildRequires:  liblastfm-qt5-devel
BuildRequires:  libmygpo-qt5-devel
BuildRequires:  qxtglobalshortcut-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(Qt5OpenGL)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Test)
BuildRequires:  pkgconfig(Qt5WebKitWidgets)
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  libQt5Gui-private-headers-devel
BuildRequires:  pkgconfig(cryptopp)
BuildRequires:  pkgconfig(fftw3)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(glew)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires:  pkgconfig(libcdio)
BuildRequires:  pkgconfig(libchromaprint)
BuildRequires:  pkgconfig(libgpod-1.0)
BuildRequires:  pkgconfig(libmtp)
BuildRequires:  pkgconfig(libmygpo-qt) >= 1.0.7
BuildRequires:  pkgconfig(libnotify)
BuildRequires:  pkgconfig(libprojectM)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(libsparsehash)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(protobuf)
BuildRequires:  pkgconfig(qca2)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(taglib) >= 1.8
Recommends: 	gstreamer-plugins-libav
Requires:       libtag1 >= 1.8
# plasma_runner dropped in clementine 1.1.0
Provides:       %{name}-kde = %{version}
Obsoletes:      %{name}-kde < %{version}

Clementine is a modern music player and library organiser. Clementine is a
port of Amarok 1.4, with some features rewritten to take advantage of Qt5.


* Search and play your local music library
* Listen to internet radio from and SomaFM
* Edit tags on MP3 and OGG files, organise your music
* Cross-platform - works on Windows, Mac OS X and Linux
* Native desktop notifications on Linux (libnotify) and Mac OS X (Growl)

%setup -q -n clementine-player
%patch6 -p1
%patch7 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1

### NOTE built against system version of libraries
rm -rvf 3rdparty/chromaprint
rm -rvf 3rdparty/taglib
rm -rvf 3rdparty/qxt
# clementine may want a non-release version of that
%if 0%{?suse_version} >= 1310
rm -rvf 3rdparty/libmygpo-qt

sed -i -e '/set(CLEMENTINE_VERSION_PATCH / s/[[:digit:]][[:digit:]]*/%{version_path}.%{rhash}/' cmake/Version.cmake

%cmake \
%if 0%{?suse_version} >= 1230
make %{?_smp_mflags} V=1


%suse_update_desktop_file %{name} Qt KDE AudioVideo Player
%fdupes -s %{buildroot}

%if 0%{?suse_version} < 1500


%license COPYING
%doc Changelog
%dir %{_datadir}/kservices5/