File kde3-amarok.spec of Package kde3-amarok
#
# spec file for package kde3-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/
#
Name: kde3-amarok
BuildRequires: SDL-devel curl-devel kdebase3-devel
BuildRequires: kdemultimedia3-devel libvisual-devel
BuildRequires: ruby-devel sqlite-devel taglib-devel xine-devel xine-lib
BuildRequires: fdupes
BuildRequires: libgpod-devel
BuildRequires: libnjb-devel
BuildRequires: libmtp-devel
BuildRequires: kdebindings3-javascript-devel libusb-devel
%if %suse_version > 1210
BuildRequires: libavutil-devel
%endif
Url: http://amarok.kde.org
License: GPL-2.0
Group: Productivity/Multimedia/Sound/Players
Summary: Media Player for KDE
Version: 1.4.10
Release: 31
Requires: amarok_engine >= %version
Requires: ruby
Requires: kde3-amarok-lang = %{version}
Recommends: libvisual-plugins
Obsoletes: amarok <= 1.4.10
Obsoletes: amarok-lang <= 1.4.10
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define mversion 0.5
Source0: amarok-%version.tar.bz2
Source1: amarok_xine-mp3_install.desktop
Source2: amarok_yauap-mp3_install.desktop
#Patch0: 1_3_BRANCH.diff
Patch1: bug-606951_covermanager-fix.patch
Patch2: use-system-icons.diff
Patch3: amarok-no-realaudio.diff
Patch7: amarok-collectionscanner.diff
Patch10: default-engine.diff
Patch13: amarok-FrameworkVersion.diff
Patch15: amarok-continue.diff
Patch16: libmtp8-buildfix.diff
Patch17: better-engine-name.diff
Patch18: ogg-mimetypes.diff
Patch19: r908415.diff
Patch20: r917750.diff
Patch21: gcc-44.diff
Patch22: gcc-45.diff
Patch23: amarok-1.4.7-alt-ru_desktop_translation.patch
Patch24: amarok-1.4.10-alt-ru_translation.patch
Patch25: gcc46-fix.patch
Patch26: amarok-1.4.6-alt-playlist.patch
Patch27: 18_add_lastfm_recommended_radio.diff
Patch28: 10_queuemedia.patch
Patch29: amarok-wiki-utf-fix.patch
Patch30: amarok-1.4.10-alt-ruby19.patch
Patch31: amarok-1.4.10-alt-mongrel.patch
Patch32: amarok-gentoo-1.4.10-xinelib-1.2.patch
Patch33: amarok-trinity-xine.patch
Patch34: amarok-deprecate-update-desktop-files.patch
Patch35: trinity-amarok-gcc6.patch
Patch36: amarok-trinity-taglib2-1.patch
Patch37: amarok-trinity-taglib2-2.patch
Patch38: trinity-taglib2.patch
Patch39: trinity-remove-c-includes.patch
%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.
%package xine
License: GPL-2.0
Group: Productivity/Multimedia/Sound/Players
Summary: Xine Output Plugin for Amarok
Requires: kde3-amarok = %version
%if %suse_version > 1020
Recommends: opensuse-codecs-installer
%endif
Provides: amarok_engine = %version
Provides: amarok-xine = 1.4.10
Obsoletes: amarok-xine <= 1.4.10
%description xine
The Amarok media player can play via Xine using this plug-in.
%package libvisual
License: GPL-2.0
Group: Productivity/Multimedia/Sound/Players
Summary: Visual Plugin Support for amaroK
Provides: amarok-libvisual = 1.4.10
Obsoletes: amarok-libvisual <= 1.4.10
%description libvisual
Visualization plugins from libvisual project can be used with amarok
using this package.
%package yauap
License: GPL-2.0
Group: Productivity/Multimedia/Sound/Players
Summary: Yauap Output Plugin for amaroK
Requires: kde3-amarok = %version yauap
Recommends: opensuse-codecs-installer
Provides: amarok_engine = %version
Provides: amarok-xine = 1.4.10
Obsoletes: amarok-xine <= 1.4.10
%description yauap
amaroK media player can play via external yauap cmdline player using
this plugin.
%lang_package
%prep
%setup -q -n amarok-%version
%patch -P 1 -p1
%patch -P 2
%patch -P 3
%patch -P 7
%patch -P 10
%patch -P 13 -p1
%patch -P 15 -p1
%patch -P 16
%patch -P 17
%patch -P 18
%patch -P 19
%patch -P 20
%patch -P 21
%patch -P 22
%patch -P 23 -p1
%patch -P 24 -p1
%patch -P 25 -p1
%patch -P 26 -p1
%patch -P 27 -p1
%patch -P 28 -p1
%patch -P 29 -p1
%patch -P 30 -p2
%patch -P 31 -p1
%patch -P 32
%patch -P 33 -p1
%patch -P 34 -p1
%patch -P 35 -p1
%patch -P 36 -p1
%patch -P 37 -p1
%patch -P 38 -p1
%patch -P 39 -p1
sed -i 1i\ '#include <cstddef>' amarok/src/magnatunebrowser/magnatuneredownloaddialog.h
sed -i 's|WFlags|Qt::WFlags|g' amarok/src/magnatunebrowser/magnatuneredownloaddialog.h
sed -i 1i\ '#include <cstdlib>' amarok/src/mediadevice/mtp/mtpmediadevice.cpp
. /etc/opt/kde3/common_options
update_admin
%build
. /etc/opt/kde3/common_options
export CXXFLAGS="$CXXFLAGS -fPIC -std=c++11"
sed -i 's|$(MP4_SUBDIR)||g' amarok/src/metadata/Makefile.am
sed -i 's|m4a||g' amarok/src/metadata/Makefile.in
sed -i 's|mp4||g' amarok/src/metadata/Makefile.in
sed -i 's|/libtagm4a.la||g' amarok/src/metadata/Makefile.in
sed -i 's|/libtagmp4.la||g' amarok/src/metadata/Makefile.in
sed -i 's/Config::MAKEFILE_CONFIG/RbConfig::MAKEFILE_CONFIG/g' configure
sed -i 's/Config.expand/RbConfig.expand/g' configure
./configure $configkde \
--without-included-sqlite \
--without-gstreamer10 \
--with-xine \
%if 0
--with-yauap \
%endif
--disable-final \
--disable-debug
make -j1
%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
kde_post_install
rm -v $RPM_BUILD_ROOT/opt/kde3/%_lib/*.la
%if %{suse_version} <= 1210
rm -v $RPM_BUILD_ROOT/opt/kde3/%_lib/ruby_lib/*.la
%endif
rm -rf $RPM_BUILD_ROOT/opt/kde3/share/locale/xx
%find_lang amarok
cp %{S:1} $RPM_BUILD_ROOT/opt/kde3/share/services
#cp %{S:2} $RPM_BUILD_ROOT/opt/kde3/share/services
%if %suse_version < 1110
mkdir -p $RPM_BUILD_ROOT/usr/share/kde4/services/
cp $RPM_BUILD_ROOT/opt/kde3/share/services/amarok*.protocol $RPM_BUILD_ROOT/usr/share/kde4/services/
%endif
%fdupes $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files lang -f amarok.lang
%defattr(-,root,root)
%dir /opt/kde3/share/locale/br
%dir /opt/kde3/share/locale/br/LC_MESSAGES
%dir /opt/kde3/share/locale/fa
%dir /opt/kde3/share/locale/fa/LC_MESSAGES
%dir /opt/kde3/share/locale/ka
%dir /opt/kde3/share/locale/ka/LC_MESSAGES
%dir /opt/kde3/share/locale/ku
%dir /opt/kde3/share/locale/ku/LC_MESSAGES
%dir /opt/kde3/share/locale/lo
%dir /opt/kde3/share/locale/lo/LC_MESSAGES
%dir /opt/kde3/share/locale/mk
%dir /opt/kde3/share/locale/mk/LC_MESSAGES
%dir /opt/kde3/share/locale/nds
%dir /opt/kde3/share/locale/nds/LC_MESSAGES
%dir /opt/kde3/share/locale/ne
%dir /opt/kde3/share/locale/ne/LC_MESSAGES
%dir /opt/kde3/share/locale/se
%dir /opt/kde3/share/locale/se/LC_MESSAGES
%dir /opt/kde3/share/locale/ss
%dir /opt/kde3/share/locale/ss/LC_MESSAGES
%dir /opt/kde3/share/locale/uz
%dir /opt/kde3/share/locale/uz/LC_MESSAGES
%dir /opt/kde3/share/locale/uz@cyrillic
%dir /opt/kde3/share/locale/uz@cyrillic/LC_MESSAGES
%dir /opt/kde3/share/locale/af
%dir /opt/kde3/share/locale/af/LC_MESSAGES
%dir /opt/kde3/share/locale/az
%dir /opt/kde3/share/locale/az/LC_MESSAGES
%dir /opt/kde3/share/locale/bn
%dir /opt/kde3/share/locale/bn/LC_MESSAGES
%dir /opt/kde3/share/locale/cy
%dir /opt/kde3/share/locale/cy/LC_MESSAGES
%dir /opt/kde3/share/locale/eo
%dir /opt/kde3/share/locale/eo/LC_MESSAGES
%dir /opt/kde3/share/locale/ga
%dir /opt/kde3/share/locale/ga/LC_MESSAGES
%dir /opt/kde3/share/locale/km
%dir /opt/kde3/share/locale/km/LC_MESSAGES
%dir /opt/kde3/share/locale/ms
%dir /opt/kde3/share/locale/ms/LC_MESSAGES
%dir /opt/kde3/share/locale/rw
%dir /opt/kde3/share/locale/rw/LC_MESSAGES
%dir /opt/kde3/share/locale/sq
%dir /opt/kde3/share/locale/sq/LC_MESSAGES
%dir /opt/kde3/share/locale/tg
%dir /opt/kde3/share/locale/tg/LC_MESSAGES
%files
%defattr(-,root,root)
%doc ChangeLog README AUTHORS COPYING
/opt/kde3/bin/amarok
/opt/kde3/bin/amarokapp
/opt/kde3/bin/amarokcollectionscanner
/opt/kde3/bin/amarok_daapserver.rb
/opt/kde3/bin/amarok_proxy.rb
/opt/kde3/%_lib/libamarok.*
/opt/kde3/share/appl*/*/*.desktop
/opt/kde3/share/servicetypes/amarok_plugin.desktop
/opt/kde3/share/apps/konqueror
/opt/kde3/share/config.kcfg/amarok.kcfg
/opt/kde3/share/config/amarokrc
/opt/kde3/share/apps/amarok
/opt/kde3/share/icons/*/*
/opt/kde3/share/apps/profiles
/opt/kde3/%_lib/kde3/konqsidebar_universalamarok.*
/opt/kde3/%_lib/kde3/libamarok_void-engine_plugin.*
/opt/kde3/%_lib/kde3/libamarok_generic-mediadevice.*
/opt/kde3/%_lib/kde3/libamarok_daap-mediadevice.*
/opt/kde3/%_lib/kde3/libamarok_massstorage-device.*
/opt/kde3/%_lib/kde3/libamarok_nfs-device.*
/opt/kde3/%_lib/kde3/libamarok_smb-device.*
/opt/kde3/share/services/amarok_generic-mediadevice.desktop
/opt/kde3/share/services/amarok_void-engine_plugin.desktop
/opt/kde3/share/services/amarok_daap-mediadevice.desktop
/opt/kde3/share/services/amarok_massstorage-device.desktop
/opt/kde3/share/services/amarok_nfs-device.desktop
/opt/kde3/share/services/amarok_smb-device.desktop
/opt/kde3/share/services/amarokitpc.protocol
/opt/kde3/share/services/amaroklastfm.protocol
/opt/kde3/share/services/amarokpcast.protocol
%if %suse_version < 1110
%dir /usr/share/kde4
%dir /usr/share/kde4/services
/usr/share/kde4/services/*
%endif
/opt/kde3/share/servicetypes/amarok_codecinstall.desktop
/opt/kde3/share/apps/konqsidebartng
/opt/kde3/%_lib/kde3/libamarok_njb-mediadevice.*
/opt/kde3/share/services/amarok_njb-mediadevice.desktop
/opt/kde3/%_lib/kde3/libamarok_mtp-mediadevice.*
/opt/kde3/share/services/amarok_mtp-mediadevice.desktop
/opt/kde3/%_lib/kde3/libamarok_ipod-mediadevice.*
/opt/kde3/share/services/amarok_ipod-mediadevice.desktop
%if %{suse_version} <= 1210
%dir /opt/kde3/%_lib/ruby_lib
/opt/kde3/%_lib/ruby_lib/http11.rb
/opt/kde3/%_lib/ruby_lib/libhttp11.*
%endif
%files xine
%defattr(-,root,root)
/opt/kde3/share/config.kcfg/xinecfg.kcfg
/opt/kde3/%_lib/kde3/libamarok_xine-engine.*
/opt/kde3/share/services/amarok_xine-engine.desktop
/opt/kde3/share/services/amarok_xine-mp3_install.desktop
%if 0
%files gstreamer
%defattr(-,root,root)
/opt/kde3/share/config.kcfg/gstconfig.kcfg
/opt/kde3/%_lib/kde3/libamarok_gst10engine_plugin.*
/opt/kde3/share/services/amarok_gst10engine_plugin.desktop
%endif
%files libvisual
%defattr(-,root,root)
/opt/kde3/bin/amarok_libvisual
%if 0
%files yauap
%defattr(-,root,root)
/opt/kde3/%_lib/kde3/libamarok_yauap-engine_plugin.*
/opt/kde3/share/services/amarok_yauap-engine_plugin.desktop
/opt/kde3/share/services/amarok_yauap-mp3_install.desktop
%endif
%changelog