Blob Blame History Raw
# Rebuild switch: 
#  --with xine    Enables xine engine
#

%{?_with_xine: %define use_xine 1}

Name:       amarok
Summary:    Media player for KDE
Version:    1.3
Release:    6%{?dist}

Group: 	    Applications/Multimedia
License:    GPL
Url:        http://amarok.kde.org
Source0:    http://dl.sf.net/amarok/amarok-1.3.tar.bz2
Patch0:     amarok-1.2.4-gcc4bl.patch
#Patch1:     amarok-1.2.4-forward-decl.patch
Patch2:     amarok-1.3-engines-cfg.patch
Patch3:     amarok-1.3-endian.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  kdemultimedia-devel >= 6:3.2
BuildRequires:  taglib-devel >= 1.3, esound-devel
BuildRequires:  desktop-file-utils, gettext
BuildRequires:  xorg-x11-Mesa-libGL
BuildRequires:  gstreamer-plugins-devel >= 0.8.4
BuildRequires:  libmusicbrainz-devel, xmms-devel >= 1:1.2
BuildRequires:  libvisual-devel >= 0.2.0, SDL-devel, gtk+-devel
#%if "%fedora" >= "4"
BuildRequires:  libtool-ltdl-devel
#%else
#BuildRequires:  libtool
#%endif
%ifnarch ppc64 x86_64 s390 s390x ia64
BuildRequires:  HelixPlayer
%endif

%if  0%{?use_xine}
BuildRequires:  xine-lib-devel >= 0:1.0.0
BuildRequires:  libmad-devel
%endif

Requires:   kdemultimedia >= 6:3.2

Obsoletes: amarok-arts < 1.3, amarok-akode < 1.3


%description
Amarok is a KDE multimedia player with:
 - fresh playlist concept, very fast to use, with drag and drop
 - plays all formats supported by the various engines
 - audio effects, like reverb and compressor
 - compatible with the .m3u and .pls formats for playlists
 - nice GUI, integrates into the KDE look, but with a unique touch

Amarok can use various engines to decode sound : gstreamer, arts,
helix and xine (disabled by default for patent reasons)
To use the helix engine, you'll have to install either HelixPlayer
or RealPlayer


%package visualisation
Summary:    Visualisation plugins for Amarok
Group:      Applications/Multimedia
Requires:   %{name} = %{version}

%description visualisation
Amarok can use visualisation plugins from different origins.
Right now, only xmms is supported, which means that you can
use any of xmms' visualisation plugins with Amarok.


#%if "%fedora" >= "4"
#%package akode
#Summary:    AKode engine for Amarok
#Group:      Applications/Multimedia
#Requires:   %{name} = %{version}
#
#%description akode
#Amarok can also use the akode engine to decode sound. This package
#enables it.
#%endif


%if 0%{?use_xine}
%package xine
Summary:    Xine engine for Amarok
Group:      Applications/Multimedia
Requires:   %{name} = %{version}

%description xine
Amarok can also use the xine engine to decode sound. This package
enables it
%endif


%prep
%setup -q
# remove test for GCC blacklisting
%patch0 -p1 -b .gcc4bl
#%patch1 -p1 -b .forward-decl
%patch2 -p1 -b .engines-cfg
%patch3 -p1 -b .endian


%build
unset QTDIR && . /etc/profile.d/qt.sh
# work around an improper ${kdelibsuff}
export QTLIB=${QTDIR}/lib QTINC=${QTDIR}/include
%configure \
     --disable-debug \
%if %{?use_xine:0}%{!?use_xine:1}
     --without-xine
%endif
#     --disable-rpath \
#     --enable-final \
#     --with-nmm \
#     --with-mas

make %{?_smp_mflags}


%install
rm -fr $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT 

# desktop files
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
mkdir -p $RPM_BUILD_ROOT%{_datadir}/apps/konqueror/servicemenus

# The desktop file contains both the desktop entry and the service menu, we have to split.
# Tail from the blank line:
perl -ne '/^$/...do{print;0}' $RPM_BUILD_ROOT%{_datadir}/applications/kde/%{name}.desktop \
    > $RPM_BUILD_ROOT%{_datadir}/apps/konqueror/servicemenus/%name.desktop
# Head until the blank line:
perl -pi -e '/^$/ && exit' $RPM_BUILD_ROOT%{_datadir}/applications/kde/%{name}.desktop

desktop-file-install  --vendor fedora \
        --dir $RPM_BUILD_ROOT%{_datadir}/applications/kde \
        --delete-original \
        --add-category Application \
        --add-category X-Fedora \
        $RPM_BUILD_ROOT%{_datadir}/applications/kde/%{name}.desktop

rm -f $RPM_BUILD_ROOT%{_datadir}/applications/kde/amarokapp.desktop
# Amarok crashes without the *.la files !
#find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'

%find_lang %{name}


%post
/sbin/ldconfig
# update icon themes if necessary
if [ -x /usr/bin/gtk-update-icon-cache ]; then
    /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg
    # needed because amarok 1.2 puts icon in hicolor
    # and the RPM did not update the cache on uninstall
    /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
fi

%postun
/sbin/ldconfig
# update icon themes if necessary
if [ -x /usr/bin/gtk-update-icon-cache ]; then
    /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg
fi


%clean
rm -fr $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/amarok
%{_bindir}/amarokapp
%_datadir/apps/%{name}
%_datadir/icons/*/*/*
%{_datadir}/applications/kde/*.desktop
%{_datadir}/services/amarok_gstengine_plugin.desktop
%{_datadir}/services/amarok_void-engine_plugin.desktop
%{_datadir}/servicetypes/*.desktop
%{_datadir}/apps/konqueror/servicemenus/*.desktop
%{_libdir}/kde3/libamarok_gstengine_plugin.*
%{_libdir}/kde3/libamarok_void-engine_plugin.*
%{_libdir}/kde3/konqsidebar_universalamarok.*
%{_datadir}/apps/konqsidebartng/*/amarok.desktop
%{_datadir}/apps/profiles/amarok.profile.xml
%{_libdir}/mcop/Amarok
%{_libdir}/mcop/amarok*
%{_datadir}/config/amarokrc
%{_datadir}/config.kcfg/*.kcfg
%{_datadir}/doc/HTML/*/amarok
# Arts engine
%{_libdir}/libamarokarts*
%{_libdir}/kde3/libamarok_artsengine_plugin.*
%{_datadir}/services/amarok_artsengine_plugin.desktop
# Helix engine
%ifnarch ppc64 x86_64 s390 s390x ia64
%{_libdir}/kde3/libamarok_helixengine_plugin.*
%{_datadir}/services/amarok_helixengine_plugin.desktop
%endif

%exclude %{_datadir}/apps/zeroconf/_shoutcast._tcp


%files visualisation
%defattr(-,root,root)
%{_bindir}/amarok_libvisual
%{_bindir}/amarok_xmmswrapper2


#%if "%fedora" >= "4"
#%files akode
#%defattr(-,root,root)
#%{_libdir}/kde3/libamarok_aKode-engine.*
#%{_datadir}/services/amarok_aKode-engine.desktop
#%endif




%if 0%{?use_xine}
%files xine
%defattr(-,root,root)
%{_libdir}/kde3/libamarok_xine-engine.*
%{_datadir}/services/amarok_xine-engine.desktop
#%{_datadir}/services/amarok_xine-engine_plugin.desktop
%endif


%changelog
* Tue Aug 23 2005 Aurelien Bompard <gauret[AT]free.fr> 1.3-6
- add version to obsoletes

* Tue Aug 23 2005 Aurelien Bompard <gauret[AT]free.fr> 1.3-5
- add missing Obsoletes.

* Mon Aug 22 2005 Aurelien Bompard <gauret[AT]free.fr> 1.3-4
- fix endian declaration on ppc

* Mon Aug 22 2005 Aurelien Bompard <gauret[AT]free.fr> 1.3-3
- dont build the Helix engine on arches where HelixPlayer is not built

* Mon Aug 22 2005 Aurelien Bompard <gauret[AT]free.fr> 1.3-2
- disable the akode engine (disabled upstream, see Changelog)
- merge in the Helix engine, since it does not have special Requires.
  HelixPlayer or RealPlayer need to be installed manually (either one)
- updated description

* Mon Aug 22 2005 Aurelien Bompard <gauret[AT]free.fr> 1.3-1
- update to version 1.3
- add Michel Salim's improvements:
  - call gtk-update-icon-cache to (de-)register icons
  - new output plugin subpackage: helix
  - patched gst and helix plugins' default settings

* Fri Jul 01 2005 Aurelien Bompard <gauret[AT]free.fr> 1.2.4-6
- remove -arts subpackage, it is useless

* Thu Jun  2 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.2.4-6.fc5
- remove temporary work-around from 1.2.4-2.fc4
- add patch to fix several missing forward declarations which let
  compilation with gcc >= 4.0.0-9 fail
- re-enable SMP make flags

* Thu Jun  2 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.2.4-5.fc4
- disable SMP make flags, since previous release failed miserably on
  i386 while the one before it succeeded

* Thu Jun  2 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.2.4-4.fc4
- set QTLIB and QTINC, so configure script does not search for Qt in
  QTDIR/lib64 on 64-bit multilib platforms

* Thu Jun  2 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.2.4-3.fc4
- try to fix build problems (#158654): always set QTDIR, always
  buildrequire libtool-ltdl-devel, disable %%fedora conditional BR

* Thu Jun  2 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.2.4-2.fc4
- temporarily add patch to work around Fedora Core bug 159090

* Mon May 23 2005 Aurelien Bompard <gauret[AT]free.fr> 1.2.4-1
- version 1.2.4
- use dist tag
- conditional builds for fc3 and fc4

* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 1.2.3-2.fc4
- rebuild on all arches

* Tue Mar 29 2005 Aurelien Bompard <gauret[AT]free.fr> 1.2.3-1.fc4
- version 1.2.3
- add libtool to BuildRequirements
- change release tag for FC4
- add a subpackage for aKode engine

* Mon Mar 14 2005 Aurelien Bompard <gauret[AT]free.fr> 1.2.2-1
- version 1.2.2

* Sat Mar 05 2005 Aurelien Bompard <gauret[AT]free.fr> 1.2.1-1
- version 1.2.1 (bugfixes)

* Mon Feb 14 2005 Aurelien Bompard <gauret[AT]free.fr> 1.2-2
- show in the GNOME menus too

* Sun Feb 13 2005 Aurelien Bompard <gauret[AT]free.fr> 1.2-1
- version 1.2 final
- drop --disable-rpath, won't build with it.
- drop epoch

* Thu Feb 10 2005 Aurelien Bompard <gauret[AT]free.fr> 0:1.2-0.2.beta4
- version 1.2 beta 4

* Sat Nov 27 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.2-0.fdr.0.1.beta1
- version 1.2beta 1
- minor cleanups
- don't ship the desktop files, split the provided one instead

* Sun Oct 24 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.1.1-0.fdr.2
- clean-up buildrequires
- fix --with xine switch
- make a -visualisation subpackage for visualisation plugins
- make a -arts subpackage to lower dependencies

* Wed Oct 20 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.1.1-0.fdr.1
- version 1.1.1

* Mon Sep 27 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.1.0-0.fdr.2
- improve buildrequires

* Sun Sep 26 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.1.0-0.fdr.1
- version 1.1 final

* Tue Sep 14 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.1.0-0.fdr.0.1.beta2
- version 1.1 beta2

* Thu Aug 05 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.0.2-0.fdr.1
- version 1.0.2
- added new xine engine

* Tue Jul 13 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.0.1-0.fdr.3
- remove BR: libselinux-devel: RH fixed the bug

* Wed Jun 30 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.0.1-0.fdr.2
- add Requires: xorg-x11-devel because of a qt packaging bug

* Tue Jun 29 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.0.1-0.fdr.1
- version 1.0.1 (bugfixes)

* Mon Jun 21 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.0-0.fdr.3
- remove BR: xine-lib-devel
- add BR: xorg-x11-Mesa-libGL and libselinux-devel

* Thu Jun 17 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.0-0.fdr.2
- add translations

* Thu Jun 17 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.0-0.fdr.1
- version 1.0 final

* Tue Jun 01 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.0-0.fdr.0.1.beta4
- update to beta4

* Sun May 09 2004 Aurelien Bompard <gauret[AT]free.fr> 1.0-0.fdr.0.1.beta3
- version 1.0-beta3

* Fri Apr 23 2004 Aurelien Bompard <gauret[AT]free.fr> 1.0-0.fdr.0.1.beta2
- version 1.0-beta2
- use desktop-file-install
- remove .la files
- remove --enable-final (won't build with it)

* Thu Apr 15 2004 Aurelien Bompard <gauret[AT]free.fr> 1.0-0.fdr.0.1.beta1
- version 1.0-beta1
- reduce BuildRequires : arts-devel already requires arts, libvorbis-devel
  and audiofile-devel

* Mon Mar 08 2004 Aurelien Bompard <gauret[AT]free.fr> 0:0.9-0.fdr.1
- version 0.9

* Wed Feb 11 2004 Aurelien Bompard <gauret[AT]free.fr> 0.8.3-0.fdr.1
- initial package