File amarok.spec of Package amarok
#
# spec file for package amarok
#
# 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/
#
%bcond_with ffmpeg
Name: amarok
Version: 2.8.0
Release: 0
Summary: Media Player for KDE
License: GPL-2.0+
Group: Productivity/Multimedia/Sound/Players
Url: http://amarok.kde.org/
Source0: ftp://ftp.kde.org/pub/kde/stable/%{name}/%{version}/src/%{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE initial-preference.diff bnc#605522 llunak@novell.com -- Increase initial preference to be used for audio files instead of Kaffeine
Patch1: initial-preference.diff
# PATCH-FIX-OPENSUSE flac_mimetype_bnc671581.diff bnc#671581 ctrippe@gmx.net -- Support for the changed mimetype for flac files
Patch2: flac_mimetype_bnc671581.diff
# PATCH-FIX-UPSTREAM revert_solid_workaround.diff
Patch3: revert_solid_workaround.diff
# PATCH-FIX-UPSTREAM 0001-Don-t-add-the-analyzer-applet-when-Phonon-doesn-t-su.patch -- avoids adding the analyzer applet on phonon backends that don't support it (e.g. vlc)
Patch100: 0001-Don-t-add-the-analyzer-applet-when-Phonon-doesn-t-su.patch
# PATCH-FIX-UPSTREAM 0002-Don-t-allow-adding-Analyzer-applet-when-not-supporte.patch -- Don't allow adding Analyzer applet when not supported.
# Also now shows an error message explaining why it can't be used.
Patch101: 0002-Don-t-allow-adding-Analyzer-applet-when-not-supporte.patch
# PATCH-FIX-UPSTREAM 0003-Optimization-Don-t-draw-more-than-necessary.patch -- optimization for Analyzer applet
Patch102: 0003-Optimization-Don-t-draw-more-than-necessary.patch
# PATCH-FIX-UPSTREAM 0004-Fix-reading-Album-Artist-Compilation-Disc-Number-in-.patch -- fixes reading APE tags (kde#323735)
Patch103: 0004-Fix-reading-Album-Artist-Compilation-Disc-Number-in-.patch
# PATCH-FIX-UPSTREAM 0005-Sync-playlist-search-config-instantly.patch -- kde#324295
Patch104: 0005-Sync-playlist-search-config-instantly.patch
# PATCH-FIX-UPSTREAM 0006-Don-t-suppress-html-tag-like-characters.patch -- kde#324614
Patch105: 0006-Don-t-suppress-html-tag-like-characters.patch
# PATCH-FIX-UPSTREAM 0007-Fix-performance-issue-with-large-podcast-feeds.patch -- kde#283022
Patch106: 0007-Fix-performance-issue-with-large-podcast-feeds.patch
# Required for the fdupes macro
BuildRequires: fdupes
BuildRequires: gdk-pixbuf-devel
BuildRequires: libcurl-devel
BuildRequires: pkgconfig(glib-2.0)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with ffmpeg}
BuildRequires: libffmpeg-devel
BuildRequires: libofa-devel
%endif
BuildRequires: libgcrypt-devel
BuildRequires: libgpod-devel >= 0.7.0
BuildRequires: libkde4-devel >= 4.6.0
BuildRequires: liblastfm-devel
BuildRequires: libmtp-devel
BuildRequires: libmygpo-qt-devel >= 1.0.5
BuildRequires: libmysqlclient-devel
BuildRequires: libmysqld-devel
BuildRequires: libopenssl-devel
BuildRequires: libqca2-devel
BuildRequires: libqjson-devel
BuildRequires: libqt4-devel >= 4.8.2
BuildRequires: loudmouth-devel
BuildRequires: nepomuk-core-devel
BuildRequires: oxygen-icon-theme
BuildRequires: qt4-qtscript
BuildRequires: taglib-devel
BuildRequires: taglib-extras-devel
BuildRequires: tcpd-devel
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
Requires: libtag-extras1 >= 1.0
Requires: phonon-backend
Requires: taglib >= 1.6
Recommends: %{name}-lang = %{version}
Recommends: clamz
Recommends: moodbar
Recommends: qt4-qtscript
Provides: kde4-amarok = 2.0.90
Obsoletes: kde4-amarok <= 2.0.89
%kde4_runtime_requires
%description
Amarok is a media player for all kinds of media. This includes MP3, Ogg
Vorbis, audio CDs, podcasts and streams. Play lists can be stored in
.m3u or .pls files.
%lang_package
%prep
%setup -q
%patch1
%patch2
%patch3 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
# Remove build time references so build-compare can do its work
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" src/main.cpp
%build
%ifarch ppc ppc64
export RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
%endif
%cmake_kde4 -d build
%make_jobs
%install
%kde4_makeinstall -C build
# Remove *.so files (not needed), fix "devel-file-in-non-devel-package" rpmlint warning
# "libampache_account_login.so" should not be removed
rm -f %{buildroot}%{_kde4_libdir}/libamarok{core,lib,ocsclient,pud,shared,-sqlcollection,-transcoding}.so
#bnc722284 amarok is not really a good player for audio-cds, remove the action for solid
rm -f %{buildroot}%{_kde4_appsdir}/solid/actions/amarok-play-audiocd.desktop
# Copy the icon for amzdownloader over from oxygen
for i in 16 22 32 48
do
mkdir -p %{buildroot}%{_kde4_iconsdir}/hicolor/${i}x${i}/actions
cp %{_kde4_iconsdir}/oxygen/${i}x${i}/actions/download.png %{buildroot}%{_kde4_iconsdir}/hicolor/${i}x${i}/actions/
done
%if 0%{?suse_version}
%suse_update_desktop_file amarok Qt KDE AudioVideo Audio Player
%suse_update_desktop_file -r amzdownloader Qt KDE AudioVideo Audio Player
%endif
%fdupes -s %{buildroot}
%find_lang amarok
%find_lang amarokcollectionscanner_qt amarok.lang
%find_lang amarokpkg amarok.lang
%kde_post_install
%post
/sbin/ldconfig
%{_kde4_bindir}/update-mime-database %{_kde4_datadir}/mime &> /dev/null || :
%postun
/sbin/ldconfig
%{_kde4_bindir}/update-mime-database %{_kde4_datadir}/mime &> /dev/null || :
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING* ChangeLog README TODO
%{_kde4_bindir}/amarok
%{_kde4_bindir}/amarok_afttagger
%{_kde4_bindir}/amarokcollectionscanner
%{_kde4_bindir}/amarokmp3tunesharmonydaemon
%{_kde4_bindir}/amarokpkg
%{_kde4_bindir}/amzdownloader
%{_kde4_modulesdir}/amarok_*
%{_kde4_modulesdir}/kcm_amarok_service_*
%{_kde4_libdir}/libamarok-sqlcollection.so.*
%{_kde4_libdir}/libamarok-transcoding.so.*
%{_kde4_libdir}/libamarokcore.so.*
%{_kde4_libdir}/libamaroklib.so.*
%{_kde4_libdir}/libamarokocsclient.so.*
%{_kde4_libdir}/libamarokpud.so.*
%{_kde4_libdir}/libamarokshared.so.*
%{_kde4_libdir}/libampache_account_login.so
%{_kde4_libdir}/libamarok_service_lastfm_shared.so
%{_kde4_applicationsdir}/amarok.desktop
%{_kde4_applicationsdir}/amarok_containers.desktop
%{_kde4_applicationsdir}/amzdownloader.desktop
%{_datadir}/dbus-1/interfaces/org.freedesktop.MediaPlayer.player.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.MediaPlayer.root.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.MediaPlayer.tracklist.xml
%{_datadir}/dbus-1/interfaces/org.kde.amarok.App.xml
%{_datadir}/dbus-1/interfaces/org.kde.amarok.Collection.xml
%{_datadir}/dbus-1/interfaces/org.kde.amarok.Mpris1Extensions.Player.xml
%{_datadir}/dbus-1/interfaces/org.kde.amarok.Mpris2Extensions.Player.xml
%{_datadir}/mime/packages/amzdownloader.xml
%{_kde4_iconsdir}/hicolor/*/apps/amarok.*
%{_kde4_iconsdir}/hicolor/*/actions/download.png
%{_kde4_appsdir}/amarok/
%dir %{_kde4_appsdir}/desktoptheme
%dir %{_kde4_appsdir}/desktoptheme/default
%dir %{_kde4_appsdir}/desktoptheme/default/widgets
%{_kde4_appsdir}/desktoptheme/default/widgets/amarok-*
%{_kde4_appsdir}/kconf_update/amarok-2.4.1-tokens_syntax_update.pl
%{_kde4_appsdir}/kconf_update/amarok.upd
%{_kde4_sharedir}/config.kcfg/amarokconfig.kcfg
%{_kde4_configdir}/amarok*
%{_kde4_servicesdir}/ServiceMenus/amarok_append.desktop
%{_kde4_servicesdir}/amarok-*
%{_kde4_servicesdir}/amarok_*
%{_kde4_servicesdir}/amarok.protocol
%{_kde4_servicesdir}/amarok*.protocol
%{_kde4_servicetypesdir}/amarok_*
%files lang -f amarok.lang
%defattr(-,root,root,-)
%changelog