File amarok.spec of Package amarok
#
# spec file for package amarok
#
# Copyright (c) 2011 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.4.3
Release: 4
Summary: Media Player for KDE
License: GPLv2+
Url: http://amarok.kde.org/
Group: Productivity/Multimedia/Sound/Players
Source0: ftp://ftp.kde.org/pub/kde/stable/amarok/%{version}/src/%{name}-%{version}.tar.bz2
# PATCH-FEATURE-OPENSUSE ksuseinstall.diff llunak@novell.com -- Support for on-demand codecs install using ksuseinstall
Patch1: ksuseinstall.diff
# PATCH-FIX-OPENSUSE initial-preference.diff bnc#605522 llunak@novell.com -- Increase initial preference to be used for audio files instead of Kaffeine
Patch2: initial-preference.diff
# PATCH-FIX-OPENSUSE flac_mimetype_bnc671581.diff bnc#671581 ctrippe@gmx.net -- Support for the changed mimetype for flac files
Patch3: flac_mimetype_bnc671581.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Required for the fdupes macro
BuildRequires: fdupes
%if 0%{?suse_version} == 1130
BuildRequires: gtk2-devel
%else
BuildRequires: gdk-pixbuf-devel
%endif
BuildRequires: glib2-devel
BuildRequires: libcurl-devel
%if %{with ffmpeg}
BuildRequires: libffmpeg-devel
BuildRequires: libofa-devel
%endif
BuildRequires: libgcrypt-devel
BuildRequires: libgpod-devel >= 0.7.0
BuildRequires: libkde4-devel
BuildRequires: libksuseinstall-devel
BuildRequires: liblastfm-devel
BuildRequires: libmtp-devel
BuildRequires: libmygpo-qt-devel
BuildRequires: libmysqlclient-devel
BuildRequires: libmysqld-devel
BuildRequires: libopenssl-devel
BuildRequires: libqca2-devel
BuildRequires: libqjson-devel
BuildRequires: loudmouth-devel
BuildRequires: mysql
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: qt4-qtscript
Requires: taglib >= 1.6
%kde4_runtime_requires
Recommends: moodbar
Recommends: %{name}-lang = %{version}
Provides: kde4-amarok = 2.0.90
Obsoletes: kde4-amarok <= 2.0.89
%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
%if !0%{?kde_updatedapps}
%patch1 -p1
%endif
%patch2
%if 0%{?suse_version} > 1130
%patch3
%endif
# 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
cd build
%kde4_makeinstall
cd ..
# bnc#509815 -- Don't require errmsg.sys from mysql package
install -pm 0644 %{_datadir}/mysql/english/errmsg.sys %{buildroot}%{_kde4_appsdir}/amarok/errmsg.sys
# 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,-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
%if 0%{?suse_version}
%suse_update_desktop_file amarok Qt KDE AudioVideo Audio Player
%endif
# Remove unneeded locales
%if 0%{?suse_version} && 0%{?suse_version} < 1140
rm -rf %{buildroot}%{_datadir}/locale/sr@ijekavian/
rm -rf %{buildroot}%{_datadir}/locale/sr@ijekavianlatin/
%endif
%fdupes -s %{buildroot}
%find_lang amarok
%find_lang amarokcollectionscanner_qt amarok.lang
%find_lang amarok_scriptengine_qscript amarok.lang
%find_lang amarokpkg amarok.lang
%kde_post_install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%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_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}/libampache_account_login.so
%{_kde4_applicationsdir}/amarok.desktop
%{_kde4_applicationsdir}/amarok_containers.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
%doc %{_kde4_htmldir}/en/amarok/
%{_kde4_iconsdir}/hicolor/*/apps/amarok.*
%{_kde4_appsdir}/amarok/
%dir %{_kde4_appsdir}/desktoptheme
%{_kde4_appsdir}/desktoptheme/Amarok-Mockup/
%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,-)
%exclude %{_kde4_htmldir}/en/amarok/
%changelog