|
%define oname player |
|
|
|
|
1 |
Summary: Last.fm web radio player |
Summary: Last.fm web radio player |
2 |
Name: lastfm-player |
Name: lastfm-player |
3 |
Version: 1.5.4.27091 |
Version: 2.1.33 |
4 |
Release: %mkrel 6 |
Release: %mkrel 1 |
5 |
Epoch: 1 |
Epoch: 1 |
6 |
License: GPLv2+ |
License: GPLv2+ |
7 |
Group: Sound/Players |
Group: Sound/Players |
8 |
Url: http://www.last.fm/tools/downloads/ |
Url: http://www.last.fm/download/ |
9 |
#gw fetched from svn://svn.audioscrobbler.net/clientside/Last.fm/tags/1.5.4 |
#gw fetched from the official Debian source package from http://apt.last.fm/debian/pool/main/l/lastfm-desktop/lastfm-desktop_2.1.33.orig.tar.gz |
10 |
#with useless binaries and other files removed (just like the Debian folks |
Source0: lastfm-desktop-%version.tar.gz |
|
#did with their dfsg tarballs): |
|
|
#rm -rf bin/*dll bin/sqldrivers/ bin/Microsoft* bin/*lib res/libsamplerate/ res/mad/ src/Twiddly/iTunesCOMAPI/ src/breakpad/external/ src/libFingerprint/libs/ src/libUnicorn/z* src/mediadevices/ipod/include/ src/output/RtAudio/dsound/ src/output/portAudio/PortAudio/ |
|
|
Source0: http://cdn.last.fm/client/src/lastfm-%version.tar.xz |
|
|
#Source0: http://www.mehercule.net/lastfm/lastfm_%%{version}+dfsg.orig.tar.gz |
|
11 |
Source1: icons.tar.gz |
Source1: icons.tar.gz |
12 |
Source2: trayicons22.tar.bz2 |
BuildRequires: qt4-devel >= 2:4.8.0 qt4-linguist |
13 |
|
BuildRequires: qtwebkit-devel |
|
BuildRequires: qt4-devel >= 2:4.3.0 qt4-linguist |
|
14 |
BuildRequires: libalsa-devel |
BuildRequires: libalsa-devel |
15 |
#gw ATM not needed on Linux |
BuildRequires: fftw3-devel libsamplerate-devel |
|
#BuildRequires: fftw3-devel libsamplerate-devel |
|
16 |
BuildRequires: libgpod-devel |
BuildRequires: libgpod-devel |
17 |
BuildRequires: libmad-devel |
BuildRequires: liblastfm-devel >= 1.0.6 |
18 |
|
BuildRequires: ffmpeg-devel |
19 |
Provides: player = %{version}-%{release} |
Provides: player = %{version}-%{release} |
20 |
Obsoletes: player < %{version}-%{release} |
Obsoletes: player < %{version}-%{release} |
21 |
|
Requires: phonon-backend |
|
# gw these patches come from the unofficial Debian package at: |
|
|
# http://mehercule.net/staticpages/index.php/lastfm |
|
|
#Don't compile portAudio output plugin on Linux. |
|
|
# And fix build on 64bit Fedora 13 |
|
|
Patch0: build-fixes.diff |
|
|
# Make sure the binaries only link to the libraries that they need |
|
|
Patch1: reduce-linkage.diff |
|
|
# The Linux client does not do fingerprinting, so don't build it. This reduces the client's package dependencies. |
|
|
Patch3: no-fingerprint-lib.diff |
|
|
# With a release build, the ALSA output plugin writes noisy messages to the log file. Only make it noisy in a debug build. |
|
|
Patch4: alsa-uses-qdebug.diff |
|
|
# Don't segfault: make sure that the audio device is open before we write to it. |
|
|
Patch5: check-soundcard-errors.diff |
|
|
# Use 22x22 icons for Linux system tray. |
|
|
Patch6: tray-icon-size.diff |
|
|
# Hide the Scrobble Directories group in the options. It's irrelevant on Linux. |
|
|
Patch7: hide-scrobbledir-option.diff |
|
|
# Control the volume by spinning the mouse wheel over the system tray icon. |
|
|
Patch9: tray-volume.diff |
|
|
# Correctly sets the language when there is no Last.fm.conf file. If you need to change the language after that, you can do so in Tools | Options | Account. |
|
|
Patch10: set-locale.diff |
|
|
# Don't re-run the setup dialog each time the program starts |
|
|
Patch12: set-firstrun-status.diff |
|
|
# Small style when using Qt >= 4.5 |
|
|
Patch13: qt45.diff |
|
|
# Fix some text/icon display issues with Qt >= 4.6 |
|
|
Patch14: qt46.diff |
|
|
# Fix warnings when compiling with Qt >= 4.7 |
|
|
Patch15: qt47.diff |
|
|
# Fix up icon installation path for Linux packages |
|
|
Patch16: dirpaths.diff |
|
|
Patch17: gcc41.diff |
|
|
# loved radio is no longer supported, don't include it in the UI |
|
|
Patch18: hide-loved-radio.diff |
|
|
# don't scrobble tracks twice |
|
|
Patch19: ipod-scrobble-fix.diff |
|
|
# Explicitly select which browser to use. Set it in Tools | Options | Connection. |
|
|
Patch52: browser-select.diff |
|
|
#gw fix linking of the ipod plugin |
|
|
Patch100: fix-linking.patch |
|
|
#gw official patch to prevent a crash |
|
|
Patch200: sidebar-crash-fix.diff |
|
|
Patch201: lastfm-1.5.4-fix-includes.patch |
|
|
# Fix build |
|
|
Patch202: lastfm-player-1.5.4-mga-Settings.h.patch |
|
|
Patch203: lastfm-player-1.5.4-mga-fix_include-playerlistener.cpp.patch |
|
|
Patch204: lastfm-player-1.5.4-mga-fix_include-lastfmapplication.cpp.patch |
|
|
Patch205: lastfm-player-1.5.4-mga-fix_include-IpodDevice.cpp.patch |
|
22 |
|
|
23 |
%description |
%description |
24 |
This is the custom radio player program for last.fm, formerly known as |
This is the custom radio player program for last.fm, formerly known as |
25 |
audioscrobbler.com. |
audioscrobbler.com. |
26 |
|
|
27 |
%prep |
%prep |
28 |
%setup -q -a 1 -n lastfm-%{version} |
%setup -q -a 1 -n lastfm-desktop-%version |
29 |
%apply_patches |
%apply_patches |
30 |
|
|
|
bzcat %{SOURCE2} | tar -C bin/data/icons -xf - |
|
|
|
|
31 |
chmod -R +r . |
chmod -R +r . |
32 |
perl -pi -e "s|\r\n|\n|" ChangeLog.txt |
perl -pi -e "s|\r\n|\n|" ChangeLog.txt |
33 |
|
|
34 |
%build |
%build |
35 |
%{qt4dir}/bin/qmake -config release |
%{qt4dir}/bin/qmake -r -config release |
36 |
%make CXX="g++ -fPIC $(pkg-config --cflags libgpod-1.0)" libdir=%{_libdir} datadir=%{_datadir} |
%make CXX="g++ -fPIC $(pkg-config --cflags libgpod-1.0)" libdir=%{_libdir} datadir=%{_datadir} |
37 |
|
|
38 |
cd i18n |
cd i18n |
39 |
%{qt4dir}/bin/lrelease *.ts |
%{qt4dir}/bin/lrelease *.ts |
|
mkdir -p ../bin/data/i18n |
|
|
cp *.qm ../bin/data/i18n |
|
|
cd .. |
|
40 |
|
|
41 |
%install |
%install |
42 |
rm -rf %{buildroot} |
rm -rf %{buildroot} |
43 |
mkdir -p %{buildroot}{%_bindir,%{_libdir}/} |
mkdir -p %{buildroot}{%_bindir,%{_libdir}/} |
44 |
cp -r bin %{buildroot}%{_libdir}/%{name} |
cp -r _bin %{buildroot}%{_libdir}/%{name} |
45 |
cat << EOF > %{buildroot}%_bindir/%{name} |
cat << EOF > %{buildroot}%_bindir/%{name} |
46 |
#!/bin/sh |
#!/bin/sh |
47 |
RUNDIR="%{_libdir}/%{name}" |
RUNDIR="%{_libdir}/%{name}" |
48 |
export LD_LIBRARY_PATH="\${RUNDIR}\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}" |
export LD_LIBRARY_PATH="\${RUNDIR}\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}" |
49 |
exec "\${RUNDIR}/last.fm" "$@" |
exec "\${RUNDIR}/Last.fm" "$@" |
50 |
EOF |
EOF |
51 |
install -d -m 755 %{buildroot}%{_datadir}/services |
install -d -m 755 %{buildroot}%{_datadir}/services |
52 |
cat > %{buildroot}%{_datadir}/services/lastfm.protocol << EOF |
cat > %{buildroot}%{_datadir}/services/lastfm.protocol << EOF |
76 |
Type=Application |
Type=Application |
77 |
StartupNotify=true |
StartupNotify=true |
78 |
Categories=Qt;AudioVideo;Audio;Player;X-MandrivaLinux-CrossDesktop; |
Categories=Qt;AudioVideo;Audio;Player;X-MandrivaLinux-CrossDesktop; |
|
X-PulseAudio-Properties=media.role=music |
|
79 |
EOF |
EOF |
80 |
|
|
81 |
mkdir -p %{buildroot}%{_datadir}/icons |
mkdir -p %{buildroot}%{_datadir}/icons |
82 |
cp -r icons/hicolor %{buildroot}%{_datadir}/icons/hicolor |
cp -r icons/hicolor %{buildroot}%{_datadir}/icons/hicolor |
83 |
find %{buildroot} -name .svn |xargs rm -rf |
find %{buildroot} -name .svn |xargs rm -rf |
84 |
|
|
85 |
rm -f %{buildroot}%{_libdir}/%{name}/*.{lib,dylib} |
mkdir -p %buildroot%_libdir/%name/i18n |
86 |
#gw the dirpaths patch expects the data files there: |
cp i18n/*.qm %buildroot%_libdir/%name/i18n |
87 |
mv %{buildroot}%{_libdir}/%{name}/data %{buildroot}%{_datadir}/lastfm |
cp app/client/Last.fm\ Scrobbler.css %buildroot%_libdir/%name |
88 |
|
|
89 |
#gw mac icons: |
#gw rpm bug: |
90 |
rm -f %{buildroot}%{_datadir}/%{name}/{icons/systray,about,install,wizard}_mac.png |
mv %buildroot%_libdir/%name/"Last.fm Scrobbler" %buildroot%_libdir/%name/"Last.fm" |
91 |
#gw just for Windows: |
|
92 |
rm -f %{buildroot}%{_libdir}/%{name}/LastFM.exe.config |
#gw else on my GNOME machine the phonon backend isn't found: |
93 |
|
ln -s %_libdir/kde4/plugins/phonon_backend/ %buildroot%_libdir/%name |
94 |
|
|
95 |
%files |
%files |
96 |
%doc ChangeLog.txt README |
%doc COPYING README.md |
97 |
%attr(755,root,root) %_bindir/%{name} |
%attr(755,root,root) %_bindir/%{name} |
98 |
%{_datadir}/applications/*.desktop |
%{_datadir}/applications/*.desktop |
99 |
%{_datadir}/icons/hicolor/*/apps/lastfm* |
%{_datadir}/icons/hicolor/*/apps/lastfm* |
100 |
%{_libdir}/%{name} |
%{_libdir}/%{name} |
|
%{_datadir}/lastfm |
|
101 |
%{_datadir}/services/lastfm.protocol |
%{_datadir}/services/lastfm.protocol |