/[packages]/cauldron/lastfm-player/current/SPECS/lastfm-player.spec
ViewVC logotype

Contents of /cauldron/lastfm-player/current/SPECS/lastfm-player.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328116 - (show annotations) (download)
Sat Dec 8 09:17:49 2012 UTC (11 years, 4 months ago) by dmorgan
File size: 5533 byte(s)
Fix  build with latest gcc
1 %define name lastfm-player
2 %define oname player
3 %define version 1.5.4.27091
4
5 Summary: Last.fm web radio player
6 Name: %{name}
7 Version: %{version}
8 Release: %mkrel 4
9 Epoch: 1
10 #gw fetched from svn://svn.audioscrobbler.net/clientside/Last.fm/tags/1.5.4
11 #with useless binaries and other files removed (just like the Debian folks
12 #did with their dfsg tarballs):
13 #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/
14 Source0: http://cdn.last.fm/client/src/lastfm-%version.tar.xz
15 #Source0: http://www.mehercule.net/lastfm/lastfm_%{version}+dfsg.orig.tar.gz
16 Source1: icons.tar.gz
17 Source2: trayicons22.tar.bz2
18 # gw these patches come from the unofficial Debian package at:
19 # http://mehercule.net/staticpages/index.php/lastfm
20 #Don't compile portAudio output plugin on Linux.
21 # And fix build on 64bit Fedora 13
22 Patch0: build-fixes.diff
23 # Make sure the binaries only link to the libraries that they need
24 Patch1: reduce-linkage.diff
25 # The Linux client does not do fingerprinting, so don't build it. This reduces the client's package dependencies.
26 Patch3: no-fingerprint-lib.diff
27 # With a release build, the ALSA output plugin writes noisy messages to the log file. Only make it noisy in a debug build.
28 Patch4: alsa-uses-qdebug.diff
29 # Don't segfault: make sure that the audio device is open before we write to it.
30 Patch5: check-soundcard-errors.diff
31 # Use 22x22 icons for Linux system tray.
32 Patch6: tray-icon-size.diff
33 # Hide the Scrobble Directories group in the options. It's irrelevant on Linux.
34 Patch7: hide-scrobbledir-option.diff
35 # Control the volume by spinning the mouse wheel over the system tray icon.
36 Patch9: tray-volume.diff
37 # 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.
38 Patch10: set-locale.diff
39 # Don't re-run the setup dialog each time the program starts
40 Patch12: set-firstrun-status.diff
41 # Small style when using Qt >= 4.5
42 Patch13: qt45.diff
43 # Fix some text/icon display issues with Qt >= 4.6
44 Patch14: qt46.diff
45 # Fix warnings when compiling with Qt >= 4.7
46 Patch15: qt47.diff
47 # Fix up icon installation path for Linux packages
48 Patch16: dirpaths.diff
49 Patch17: gcc41.diff
50 # loved radio is no longer supported, don't include it in the UI
51 Patch18: hide-loved-radio.diff
52 # don't scrobble tracks twice
53 Patch19: ipod-scrobble-fix.diff
54 # Explicitly select which browser to use. Set it in Tools | Options | Connection.
55 Patch52: browser-select.diff
56 #gw fix linking of the ipod plugin
57 Patch100: fix-linking.patch
58 #gw official patch to prevent a crash
59 Patch200: sidebar-crash-fix.diff
60 Patch201: lastfm-1.5.4-fix-includes.patch
61 License: GPLv2+
62 Group: Sound
63 Url: http://www.last.fm/tools/downloads/
64 BuildRequires: qt4-devel >= 2:4.3.0 qt4-linguist
65 BuildRequires: libalsa-devel
66 #gw ATM not needed on Linux
67 #BuildRequires: fftw3-devel libsamplerate-devel
68 BuildRequires: libgpod-devel
69 BuildRequires: libmad-devel
70 Provides: player
71 Obsoletes: player
72
73 %description
74 This is the custom radio player program for last.fm, formerly known as
75 audioscrobbler.com.
76
77 %prep
78 %setup -q -a 1 -n lastfm-%{version}
79 %apply_patches
80
81 bzcat %{SOURCE2} | tar -C bin/data/icons -xf -
82
83 chmod -R +r .
84 perl -pi -e "s|\r\n|\n|" ChangeLog.txt
85
86 %build
87 %{qt4dir}/bin/qmake -config release
88 %make CXX="g++ -fPIC $(pkg-config --cflags libgpod-1.0)" libdir=%{_libdir} datadir=%{_datadir}
89
90 cd i18n
91 %{qt4dir}/bin/lrelease *.ts
92 mkdir -p ../bin/data/i18n
93 cp *.qm ../bin/data/i18n
94 cd ..
95
96 %install
97 rm -rf %{buildroot}
98 mkdir -p %{buildroot}{%_bindir,%{_libdir}/}
99 cp -r bin %{buildroot}%{_libdir}/%{name}
100 cat << EOF > %{buildroot}%_bindir/%{name}
101 #!/bin/sh
102 RUNDIR="%{_libdir}/%{name}"
103 export LD_LIBRARY_PATH="\${RUNDIR}\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}"
104 exec "\${RUNDIR}/last.fm" "$@"
105 EOF
106 install -d -m 755 %{buildroot}%{_datadir}/services
107 cat > %{buildroot}%{_datadir}/services/lastfm.protocol << EOF
108 [Protocol]
109 exec=%_bindir/%{name} "%u"
110 protocol=lastfm
111 input=none
112 output=none
113 helper=true
114 listing=
115 reading=false
116 writing=false
117 makedir=false
118 deleting=false
119 EOF
120
121 mkdir -p %{buildroot}%{_datadir}/applications
122 # (cg) Ensure the name is last.fm.desktop to match the binary name.
123 # This allows PulseAudio to parse the .desktop file for extra metadata.
124 cat > %{buildroot}%{_datadir}/applications/last.fm.desktop << EOF
125 [Desktop Entry]
126 Name=Last.FM Player
127 Comment=Play the last.fm internet radio
128 Exec=%{name} %U
129 Icon=lastfm
130 Terminal=false
131 Type=Application
132 StartupNotify=true
133 Categories=Qt;AudioVideo;Audio;Player;X-MandrivaLinux-CrossDesktop;
134 X-PulseAudio-Properties=media.role=music
135 EOF
136
137 mkdir -p %{buildroot}%{_datadir}/icons
138 cp -r icons/hicolor %{buildroot}%{_datadir}/icons/hicolor
139 find %{buildroot} -name .svn |xargs rm -rf
140
141 rm -f %{buildroot}%{_libdir}/%{name}/*.{lib,dylib}
142 #gw the dirpaths patch expects the data files there:
143 mv %{buildroot}%{_libdir}/%{name}/data %{buildroot}%{_datadir}/lastfm
144
145 #gw mac icons:
146 rm -f %{buildroot}%{_datadir}/%{name}/{icons/systray,about,install,wizard}_mac.png
147 #gw just for Windows:
148 rm -f %{buildroot}%{_libdir}/%{name}/LastFM.exe.config
149
150 %clean
151 rm -rf %{buildroot}
152
153 %files
154 %defattr(-,root,root)
155 %doc ChangeLog.txt README
156 %attr(755,root,root) %_bindir/%{name}
157 %{_datadir}/applications/*.desktop
158 %{_datadir}/icons/hicolor/*/apps/lastfm*
159 %{_libdir}/%{name}
160 %{_datadir}/lastfm
161 %{_datadir}/services/lastfm.protocol
162
163

  ViewVC Help
Powered by ViewVC 1.1.30