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/
#

# norootforbuild


Name:           amarok
BuildRequires:  cups-devel libkcddb4-devel mysql ruby-devel sqlite-devel taglib-devel
BuildRequires:  kdebase4-workspace-devel libkcompactdisc4-devel tse3-devel update-desktop-files
BuildRequires:  gstreamer010-devel libmtp-devel libvisual-devel xine-devel
BuildRequires:  flac-devel gtk2-devel libQtWebKit-devel libdvdread-devel libkde4-devel
BuildRequires:  dbus-1-glib-devel libogg-devel libsamplerate-devel libsndfile-devel
BuildRequires:  libcurl-devel libsoprano-devel loudmouth-devel
BuildRequires:  libmysqlclient-devel libqca2-devel
BuildRequires:  qt4-qtscript taglib-extras-devel tcpd-devel
BuildRequires:  libgpod-devel >= 0.7.0
%if %suse_version > 1120 || !0%{?kde_updatedapps}
BuildRequires:  liblastfm-devel
BuildRequires:  libksuseinstall-devel
%endif
%if %suse_version > 1110
BuildRequires:  libmysqld-devel
%endif
# Required for the fdupes macro
BuildRequires:  fdupes
Url:            http://amarok.kde.org
License:        GPLv2+
Group:          Productivity/Multimedia/Sound/Players
Summary:        Media Player for KDE
Version:        2.4.0
Release:        8.<RELEASE3>
Source0:        %{name}-%{version}.tar.bz2
Source100:      %{name}-rpmlintrc
Patch3:         errmsg-mysql-embedded.diff
Patch4:         errmsg-mysql51-embedded.diff
# PATCH-FIX-OPENSUSE no_buildtime.patch cmorve69@yahoo.es -- Remove build time from code so build-compare can make its work
Patch5:         no_buildtime.patch
Patch7:         ksuseinstall.diff
Patch8:         initial-preference.diff
Patch9:         amarok-e1aa6497-missing-toolbar-fresh-start.diff
#Patch9:         0001-Re-add-some-tests-for-unprintable-but-also-invalid-c.patch
# Mimetype of flac changed for 11.4
Patch10:        flac_mimetype_bnc671581.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       kde4-amarok = 2.0.90
Obsoletes:      kde4-amarok <= 2.0.89
Requires:       qt4-qtscript
Recommends:     %{name}-lang = %{version}
Requires:       taglib >= 1.6
Requires:       libtag-extras1 >= 1.0
%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.



Authors:
--------
    Christian Muehlhaeuser <chris@chris.de>
    Mark Kretschmann <markey@web.de>
    Max Howell <max.howell@methylblue.com>
    Stanislav Karchebny <berk@inbox.ru>

%package devel
License:        GPLv2+
Summary:        Development Files for %{name}
Requires:       %{name} = %{version}-%{release}
Group:          Development/Languages/C and C++

%description devel
Amarok build environment development files

%lang_package
%prep
%setup -q -n %name-%{version}
%if %suse_version > 1110
%patch4
%else
# does not apply?
#%patch3
%endif
%patch5 -p0
%if %suse_version > 1120 || !0%{?kde_updatedapps}
%patch7 -p1
%endif
%patch8
%patch9 -p1
%if %suse_version > 1130
%patch10
%endif

%build
%ifarch ppc ppc64
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mminimal-toc"
%endif
  %cmake_kde4 -d build
  %make_jobs

%install
  cd build
  %makeinstall
  cd ..
  install -m 0644 /usr/share/mysql/english/errmsg.sys $RPM_BUILD_ROOT/usr/share/kde4/apps/amarok/errmsg.sys 
  %suse_update_desktop_file -r amarok AudioVideo Player
  rm -rf $RPM_BUILD_ROOT//usr/share/locale/sr@ijekavian
  rm -rf $RPM_BUILD_ROOT//usr/share/locale/sr@ijekavianlatin
  %find_lang amarok
  %find_lang amarokcollectionscanner_qt amarok.lang
  %find_lang amarok_scriptengine_qscript amarok.lang
  %find_lang amarokpkg amarok.lang
  %kde_post_install
  # create hardlinks for duplicate file using fdupes macro
  %fdupes %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
%{__rm} -rf %{buildroot}

%files lang -f amarok.lang

%files
%defattr(-,root,root)
%doc ChangeLog AUTHORS TODO README
%_bindir/amarok
%_bindir/amarokcollectionscanner
%_bindir/amarok_afttagger
%_bindir/amarokmp3tunesharmonydaemon
%_bindir/amarokpkg
%_kde4_modules/amarok_*
%_kde4_modules/kcm_amarok_service_*
%_libdir/libamaroklib.so.*
%_libdir/libamarokcore.so.*
%_libdir/libamarokpud.so.*
%{_libdir}/libampache_account_login.so
%_libdir/libamarokocsclient.so.*
%_libdir/libamarok-sqlcollection.so.*
%{_libdir}/libamarokqtjson.so.*
%{_libdir}/libamarok-transcoding.so.*
%{_datadir}/applications/kde4/amarok.desktop
%{_datadir}/applications/kde4/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.Collection.xml
#%{_datadir}/dbus-1/interfaces/org.kde.amarok.SqlCollection.xml
%{_datadir}/dbus-1/interfaces/org.kde.amarok.App.xml
%{_datadir}/dbus-1/interfaces/org.kde.amarok.Mpris1Extensions.Player.xml
%{_datadir}/dbus-1/interfaces/org.kde.amarok.Mpris2Extensions.Player.xml
%{_datadir}/icons/hicolor/*/apps/amarok.*
%_kde_share_dir/apps/solid/actions/amarok-play-audiocd.desktop
%_kde_share_dir/apps/amarok
%_kde_share_dir/apps/desktoptheme/Amarok-Mockup
%_kde_share_dir/apps/desktoptheme/default/widgets/amarok-*
%_kde_share_dir/config.kcfg/amarokconfig.kcfg
%_kde_config_dir/amarok*
%_kde_share_dir/servicetypes/amarok_*
%_kde_share_dir/services/amarok-*
%_kde_share_dir/services/amarok_*
%_kde_share_dir/services/amarok.protocol
%_kde_share_dir/services/amarok*.protocol
%_kde_share_dir/services/ServiceMenus/amarok_append.desktop

%files devel
%defattr(-,root,root)
%{_libdir}/libamaroklib.so
%{_libdir}/libamarokcore.so
%{_libdir}/libamarokpud.so
%{_libdir}/libamarokocsclient.so
%{_libdir}/libamarok-sqlcollection.so
%{_libdir}/libamarokqtjson.so
%{_libdir}/libamarok-transcoding.so

%changelog
openSUSE Build Service is sponsored by