%define name lastfm-player %define oname player %define version 1.3.2.13 %define rel 1 Summary: Last.fm web radio player Name: %{name} Version: %{version} Release: %mkrel %rel Epoch: 1 # svn://svn.audioscrobbler.net/client Source0: http://static.last.fm/client/Linux/last.fm-%version.src.tar.bz2 Source1: lastfm-icons.tar.bz2 Source2: trayicons22.tar.bz2 # gw these patches come from the unofficial Debian package at: # http://mehercule.net/staticpages/index.php/lastfm Patch1: 01_translations.diff Patch2: 02_tray-icon-size.diff Patch3: http://mehercule.net/lastfm/03_no-mediadevice.diff Patch4: http://mehercule.net/lastfm/04_alsaplayback.diff Patch5: http://mehercule.net/lastfm/05_tray-volume.diff Patch7: 07_tooltip-segfault-fix.diff Patch8: http://mehercule.net/lastfm/08_silence-debug.diff Patch9: 09_set-locale.diff Patch10: http://mehercule.net/lastfm/10_container-load.diff Patch20: http://mehercule.net/lastfm/04_transcode.diff Patch52: 52_browser-select.diff License: GPL Group: Sound Url: http://www.last.fm/tools/downloads/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: qt4-devel >= 2:4.2 qt4-linguist BuildRequires: libalsa-devel Provides: player Obsoletes: player %description This is the custom radio player program for last.fm, formerly known as audioscrobbler.com. %prep %setup -q -a 1 -n last.fm-%version %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch20 -p1 %patch52 -p1 bzcat %{SOURCE2} | tar -C bin/data/icons -xf - chmod -R +r . perl -pi -e "s|\r\n|\n|" ChangeLog %build %{qt4dir}/bin/qmake -config release make CXX="g++ -fPIC" cd i18n %{qt4dir}/bin/lrelease *.ts cp *.qm ../bin/data/i18n cd .. %install rm -rf $RPM_BUILD_ROOT mkdir -p %buildroot{%_bindir,%_libdir/} cp -r bin %buildroot%_libdir/%name cat << EOF > %buildroot%_bindir/%name #!/bin/sh %_libdir/%name/last.fm \$* EOF install -d -m 755 $RPM_BUILD_ROOT%_datadir/services cat > $RPM_BUILD_ROOT%_datadir/services/lastfm.protocol << EOF [Protocol] exec=%_bindir/%name "%u" protocol=lastfm input=none output=none helper=true listing= reading=false writing=false makedir=false deleting=false EOF mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}.desktop << EOF [Desktop Entry] Name=Last.FM Player Comment=Play the last.fm internet radio Exec=%name %U Icon=lastfm Terminal=false Type=Application StartupNotify=true Categories=Qt;AudioVideo;Audio;Player; EOF mkdir -p %buildroot%_datadir/icons cp -r icons/crystalsvg %buildroot%_datadir/icons/hicolor find %buildroot -name .svn |xargs rm -rf %clean rm -rf $RPM_BUILD_ROOT %post %update_menus %update_icon_cache hicolor %postun %clean_menus %clean_icon_cache hicolor %files %defattr(-,root,root) %doc ChangeLog README %attr(755,root,root) %_bindir/%name %_datadir/applications/mandriva-* %_datadir/icons/hicolor/*/apps/lastfm* %_libdir/%name %_datadir/services/lastfm.protocol %changelog * Fri Oct 05 2007 Götz Waschk <waschk@mandriva.org> 1.3.2.13-1mdv2008.1 + Revision: 95558 - new version - update patches * Tue Sep 11 2007 Götz Waschk <waschk@mandriva.org> 1:1.3.1.0-2mdv2008.0 + Revision: 84577 - fix browser selection patch - fix menu category - drop patch 20, fixing bug #33463 - remove unused patches + Thierry Vignaud <tvignaud@mandriva.com> - kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated' * Tue Jul 24 2007 Funda Wang <fundawang@mandriva.org> 1:1.3.1.0-1mdv2008.0 + Revision: 54883 - Enable browser selection patch - refresh patches - New version * Sat May 19 2007 Olivier Blin <oblin@mandriva.com> 1:1.1.3-2mdv2008.0 + Revision: 28409 - add back menu macros * Tue Apr 03 2007 Götz Waschk <waschk@mandriva.org> 1.1.3-1mdv2007.1 + Revision: 150239 - fix buildrequires - no more update-menus + Frederic Crozat <fcrozat@mandriva.com> - Release 1.1.3 - Remove patches 0 (no longer needed), 10 (merged) - Update patches 2, 3, 4, 5, 6, 9, 13 - Patch0 (mehercule): fix user config path - Patch14 (mehercule): fix translations support - Patch15 (mehercule): Add 22x22 tray icon * Tue Jan 23 2007 Götz Waschk <waschk@mandriva.org> 1:1.0.9.6-1mdv2007.1 + Revision: 112420 - Import lastfm-player * Tue Jan 23 2007 Götz Waschk <waschk@mandriva.org> 1.0.9.6-1mdv2007.1 - synchronize patches with Debian - new version * Thu Aug 03 2006 Götz Waschk <waschk@mandriva.org> 1.0.0.1-0.2113.2mdv2007.0 - fix crash on play by switching to oss * Tue Jul 25 2006 Götz Waschk <waschk@mandriva.org> 1:1.0.0.1-0.2113.1mdv2007.0 - drop patch - new version * Thu Jun 29 2006 Götz Waschk <waschk@mandriva.org> 1.1.90-0.2099.3mdv2007.0 - fix xdg menu * Wed Jun 28 2006 Götz Waschk <waschk@mandriva.org> 1.1.90-0.2099.2mdv2007.0 - fix build with gcc 4.1 - xdg menu * Fri Apr 07 2006 Götz Waschk <waschk@mandriva.org> 1.1.90-0.2099.1mdk - drop patch - change license to GPL - new snapshot * Fri Feb 10 2006 Götz Waschk <waschk@mandriva.org> 1.1.5-0.1988.1mdk - fix build on x86_64 - new version * Tue Jan 31 2006 Götz Waschk <waschk@mandriva.org> 1.1.4-0.1933.1mdk - new version * Tue Dec 20 2005 Götz Waschk <waschk@mandriva.org> 1.1.3-0.1907.1mdk - new version * Mon Dec 12 2005 Götz Waschk <waschk@mandriva.org> 1.1.1-0.1892.3mdk - fix buildrequires * Sun Dec 11 2005 Anssi Hannula <anssi.hannula@gmail.com> 1.1.1-0.1892.2mdk - fix lib64 build * Wed Dec 07 2005 Götz Waschk <waschk@mandriva.org> 1.1.1-0.1892.1mdk - fix build - ne version * Sat Oct 01 2005 Götz Waschk <waschk@mandriva.org> 1.0.4-1mdk - New release 1.0.4 * Fri Aug 26 2005 Götz Waschk <waschk@mandriva.org> 1.0.3-1mdk - new version * Tue Aug 16 2005 Götz Waschk <waschk@mandriva.org> 1.0.1-1mdk - fix qmake call - fix the version number * Sat Aug 13 2005 Götz Waschk <waschk@mandriva.org> 0-0.20050812.4mdk - fix the program icons * Sat Aug 13 2005 Götz Waschk <waschk@mandriva.org> 0-0.20050812.3mdk - add KDE protocol handler (Nick Brown) * Sat Aug 13 2005 Götz Waschk <waschk@mandriva.org> 0-0.20050812.2mdk - rename from player * Sat Aug 13 2005 Götz Waschk <waschk@mandriva.org> 0-0.20050812.1mdk - initial package