lastfm-player-vl.spec 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. %define name lastfm-player
  2. %define oname player
  3. %define version 1.4.2.58240
  4. Summary: Last.fm web radio player
  5. Name: %{name}
  6. Version: %{version}
  7. Release: 1%{?_dist_release}
  8. # svn://svn.audioscrobbler.net/client
  9. Source0: http://cdn.last.fm/client/src/last.fm-%version.src.tar.bz2
  10. Source1: http://www.mehercule.net/lastfm/icons.tar.gz
  11. Source2: http://www.mehercule.net/lastfm/trayicons22.tar.gz
  12. Patch0: http://mehercule.net/lastfm/00_build-fixes.diff
  13. Patch1: http://mehercule.net/lastfm/no-fingerprint.diff
  14. Patch2: http://mehercule.net/lastfm/02_tray-icon-size.diff
  15. Patch3: http://mehercule.net/lastfm/03_no-scrobble-directories.diff
  16. License: GPL
  17. Group: Applications/Multimedia
  18. Url: http://www.last.fm/tools/downloads/
  19. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
  20. BuildRequires: qt4-devel >= 4.2, qt4-designer
  21. BuildRequires: alsa-lib-devel, libsamplerate-devel, fftw3-devel, libmad-devel, libgpod-devel
  22. Requires: alsa-lib, libsamplerate, fftw3, libmad, libgpod
  23. Provides: player
  24. Obsoletes: player
  25. %description
  26. This is the custom radio player program for last.fm, formerly known as
  27. audioscrobbler.com.
  28. %prep
  29. %setup -q -a 1 -n last.fm-%version
  30. %patch0 -p1
  31. %patch1 -p1
  32. %patch2 -p1
  33. %patch3 -p1
  34. bzcat %{SOURCE2} | tar -C bin/data/icons -xf -
  35. chmod -R +r .
  36. perl -pi -e "s|\r\n|\n|" ChangeLog
  37. %build
  38. qmake -config release
  39. make
  40. cd i18n
  41. lrelease *.ts
  42. mkdir -p ../bin/data/i18n
  43. cp *.qm ../bin/data/i18n/
  44. cd ..
  45. %install
  46. rm -rf $RPM_BUILD_ROOT
  47. mkdir -p %buildroot{%_bindir,%_libdir/}
  48. cp -r bin %buildroot%_libdir/%name
  49. cat << EOF > %buildroot%_bindir/%name
  50. #!/bin/sh
  51. /usr/lib/%name/last.fm.sh \$*
  52. EOF
  53. install -d -m 755 $RPM_BUILD_ROOT%_datadir/services
  54. cat > $RPM_BUILD_ROOT%_datadir/services/lastfm.protocol << EOF
  55. [Protocol]
  56. exec=%_bindir/%name "%u"
  57. protocol=lastfm
  58. input=none
  59. output=none
  60. helper=true
  61. listing=
  62. reading=false
  63. writing=false
  64. makedir=false
  65. deleting=false
  66. EOF
  67. mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
  68. cat > $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop << EOF
  69. [Desktop Entry]
  70. Name=Last.FM Player
  71. Comment=Play the last.fm internet radio
  72. Exec=%name %U
  73. Icon=lastfm
  74. Terminal=false
  75. Type=Application
  76. StartupNotify=true
  77. Categories=Qt;AudioVideo;Audio;Player;
  78. EOF
  79. mkdir -p %buildroot%_datadir/icons
  80. cp -r icons/hicolor %buildroot%_datadir/icons/hicolor
  81. find %buildroot -name .svn |xargs rm -rf
  82. rm %buildroot%_libdir/lastfm-player/*.lib
  83. %clean
  84. rm -rf $RPM_BUILD_ROOT
  85. %post
  86. %postun
  87. %files
  88. %defattr(-,root,root)
  89. %doc ChangeLog README
  90. %attr(755,root,root) %_bindir/%name
  91. %_datadir/applications/*
  92. %_datadir/icons/hicolor/*/apps/lastfm*
  93. %_libdir/%name
  94. %_datadir/services/lastfm.protocol
  95. %changelog
  96. * Sun Apr 13 2008 Satoshi MACHINO <machino@vinelinux.org> 1.4.2.58240-1vl5
  97. - new upstream release.
  98. - update Source[012] URLs and Url.
  99. - change Group from Sound to Applications/Multimedia.
  100. - fixed hicolor icons's cp
  101. * Fri Jan 04 2008 Satoshi MACHINO <machino@vinelinux.org> 1.4.1.57486-0vl1
  102. - first build for VineLinux