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