File clementine.spec of Package clementine
#
# spec file for package clementine
#
# Copyright (c) 2013 SUSE LINUX Products 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: clementine
Version: 1.1.1
Release: 0
Summary: A cross-platform Music Player based on Amarok 1
License: GPL-3.0+
Group: Productivity/Multimedia/Sound/Players
Url: http://code.google.com/p/clementine-player/
Source: http://clementine-player.googlecode.com/files/%{name}-%{version}.tar.gz
# Those 2 source files fixes 2 polish lyrics parser.
# TODO Please drop them with next version of clementine > 1.1.1
Source1: ultimate_providers.xml
Source2: sites.js
# PATCH-FIX-OPENSUSE clementine-desktop-fix.patch fisiu@opensuse.org -- remove unity related shortcuts
Patch0: clementine-desktop-fix.patch
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: freeglut-devel
BuildRequires: gcc-c++
BuildRequires: gettext-tools
#BuildRequires: git
BuildRequires: help2man
BuildRequires: hicolor-icon-theme
BuildRequires: liblastfm-devel
BuildRequires: update-desktop-files
# No gnutls means no gloox with license problem (GPL-2.0 only)
#BuildRequires: pkgconfig(gnutls)
BuildRequires: pkgconfig(libimobiledevice-1.0)
BuildRequires: pkgconfig(libplist)
BuildRequires: pkgconfig(libusbmuxd)
%if 0%{?suse_version} >= 1220
BuildRequires: pkgconfig(protobuf)
%else
BuildRequires: libprotobuf-lite6
%endif
BuildRequires: pkgconfig(QJson)
BuildRequires: pkgconfig(QtCore)
BuildRequires: pkgconfig(QtGui)
BuildRequires: pkgconfig(QtSql)
BuildRequires: pkgconfig(QtWebKit)
BuildRequires: pkgconfig(fftw3)
BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(gstreamer-0.10)
BuildRequires: pkgconfig(gstreamer-plugins-base-0.10)
BuildRequires: pkgconfig(libcdio)
BuildRequires: pkgconfig(libgpod-1.0)
BuildRequires: pkgconfig(libmtp)
BuildRequires: pkgconfig(libnotify)
%if 0%{?suse_version} >= 1230
BuildRequires: pkgconfig(libsparsehash)
%endif
BuildRequires: pkgconfig(qca2)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(taglib)
# gnome indicator - while we don't have it in OSS we don't build it
# BuildRequires: libindicator-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# plasma_runner dropped in clementine 1.1.0
Provides: %{name}-kde = %{version}
Obsoletes: %{name}-kde < %{version}
%description
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 Qt4.
Features:
* Search and play your local music library
* Listen to internet radio from Last.fm 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)
%prep
%setup -q
%patch0
# Remote control support cannot be enabled without the owner of gloox (http://camaya.net/gloox)
# first giving permission for relicensing to GPLv2 or later. See bnc#695820
rm -rf --verbose 3rdparty/gloox
# 3rdparty/qxt
# TODO Please drop them with next version of clementine > 1.1.1
cp -v %{S:1} data/lyrics/
cp -v %{S:2} tools/ultimate_lyrics_parser/
%build
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
export CFLAGS="$CXXFLAGS"
mkdir build && cd build && \
cmake -DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
%if 0%{?suse_version} >= 1230
-DENABLE_GOOGLE_DRIVE=ON \
%endif
-DENABLE_MOODBAR=ON ..
make %{?_smp_mflags}
%install
cd build
%make_install
%suse_update_desktop_file clementine Qt KDE AudioVideo Audio Player
# Generate man page with help2man
mkdir -p %{buildroot}%{_mandir}/man1
pushd %{buildroot}%{_mandir}/man1
cp -v %{buildroot}%{_bindir}/%{name} ./
help2man --version-string="%{version}" -N -o %{name}.1 ./%{name}
rm %{name}
popd
%fdupes -s %{buildroot}
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%doc Changelog COPYING
%{_bindir}/clementine
%{_bindir}/clementine-tagreader
%{_datadir}/applications/clementine.desktop
%{_datadir}/icons/hicolor/64x64/apps/application-x-clementine.png
%{_datadir}/icons/hicolor/scalable/apps/application-x-clementine.svg
%dir %{_datadir}/kde4/
%dir %{_datadir}/kde4/services/
%{_datadir}/kde4/services/clementine-feed.protocol
%{_datadir}/kde4/services/clementine-itms.protocol
%{_datadir}/kde4/services/clementine-itpc.protocol
%{_datadir}/kde4/services/clementine-zune.protocol
%if 0%{?suse_version} >= 1140
%{_mandir}/man1/%{name}.1.gz
%endif
%changelog