File strawberry.spec of Package strawberry

# spec file for package strawberry
# 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 sha d035c7d3b855a70739ed6a88eaddd687fb1c58d0

Name:           strawberry
Release:        0
Summary:        A music player and music collection organizer
License:        GPL-3.0+
Group:          Productivity/Multimedia/Sound/Players

%if 0%{?suse_version} && 0%{?suse_version} > 1325
BuildRequires:  libboost_headers-devel
BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  make
BuildRequires:  git
BuildRequires:  gettext
BuildRequires:  desktop-file-utils
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%if 0%{?suse_version}
BuildRequires:  appstream-glib
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos}
BuildRequires:  libappstream-glib
BuildRequires:  appstream-util
%if 0%{?mageia}
BuildRequires:  notification-daemon
%ifarch x86_64
BuildRequires:  lib64raw1394-devel
BuildRequires:  libraw1394-devel
%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?mageia}
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(gio-unix-2.0)
BuildRequires:  pkgconfig(gthread-2.0)
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(gnutls)
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(protobuf)
BuildRequires:  pkgconfig(sqlite3) >= 3.9
%if ! 0%{?centos} && ! 0%{?mageia}
BuildRequires:  pkgconfig(taglib)
BuildRequires:  pkgconfig(fftw3)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Test)
BuildRequires:  pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(gstreamer-app-1.0)
BuildRequires:  pkgconfig(gstreamer-audio-1.0)
BuildRequires:  pkgconfig(gstreamer-base-1.0)
BuildRequires:  pkgconfig(gstreamer-tag-1.0)
%if ( ! 0%{?centos} && ! 0%{?suse_version} ) || 0%{?is_opensuse}
BuildRequires:  pkgconfig(libchromaprint)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(libcdio)
%if ! 0%{?suse_version} || 0%{?is_opensuse}
BuildRequires:  pkgconfig(libgpod-1.0)
BuildRequires:  pkgconfig(libmtp)
BuildRequires:  pkgconfig(libnotify)
BuildRequires:  pkgconfig(libudf)
%if 0%{?suse_version} && 0%{?is_opensuse} && 0%{?suse_version} >= 1500
BuildRequires:  pkgconfig(libxine)
BuildRequires:  pkgconfig(libvlc)

%if 0%{?mageia}
%ifarch x86_64
BuildRequires:  lib64qt5keychain-devel
BuildRequires:  libqt5keychain-devel

%if 0%{?suse_version} && 0%{?is_opensuse}
BuildRequires:  qtkeychain-qt5-devel

%if 0%{?fedora_version}
BuildRequires:  qtkeychain-qt5-devel

%if 0%{?suse_version}
Requires:       libQt5Sql5-sqlite

%if 0%{?suse_version} && 0%{?suse_version} < 1500
Requires(post): update-desktop-files
Requires(post): gtk3-tools
Requires(postun): update-desktop-files
Requires(postun): gtk3-tools

Strawberry is a music player and music collection organizer.
It is a fork of Clementine. The name is inspired by the band Strawbs.

  - Play and organize music
  - Supports WAV, FLAC, WavPack, DSF, DSDIFF, Ogg Vorbis, Speex, MPC, TrueAudio, AIFF, MP4, MP3 and ASF
  - Audio CD playback
  - Native desktop notifications
  - Playlists in multiple formats
  - Advanced audio output and device configuration for bit-perfect playback on Linux
  - Edit tags on music files
  - Fetch tags from MusicBrainz
  - Album cover art from, Musicbrainz, Discogs and Deezer
  - Song lyrics from AudD
  - Support for multiple backends
  - Audio analyzer
  - Audio equalizer
  - Transfer music to iPod, iPhone, MTP or mass-storage USB player
  - Scrobbler with support for, and ListenBrainz
  - Streaming support for Subsonic

%setup -qn strawberry-%{sha}

%if 0%{?suse_version} && 0%{?suse_version} > 1500

make %{?_smp_mflags}

%if 0%{?suse_version}
  %if 0%{?mageia}
    %make_install -C build

%if 0%{?suse_version} && 0%{?suse_version} < 1500
rm -f %{buildroot}%{_datadir}/metainfo/org.strawberrymusicplayer.strawberry.appdata.xml

%if 0%{?suse_version}
%suse_update_desktop_file org.strawberrymusicplayer.strawberry Qt AudioVideo Audio Player

%if 0%{?suse_version} && 0%{?suse_version} < 1500


desktop-file-validate %{buildroot}%{_datadir}/applications/org.strawberrymusicplayer.strawberry.desktop
%if 0%{?fedora_version} && 0%{?fedora_version} >= 29
  appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.strawberrymusicplayer.strawberry.appdata.xml
  %if ! 0%{?suse_version} || ( 0%{?suse_version} && 0%{?suse_version} >= 1500 )
    appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.strawberrymusicplayer.strawberry.appdata.xml

%doc Changelog
%license COPYING
%if 0%{?fedora_version} && 0%{?fedora_version} >= 29
  %if ! 0%{?suse_version} || ( 0%{?suse_version} && 0%{?suse_version} >= 1500 )