/[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 610700 - (show annotations) (download)
Sun Mar 30 19:40:12 2014 UTC (6 years, 9 months ago) by daviddavid
File size: 2837 byte(s)
rebuild for new libplist

1 Summary: Last.fm web radio player
2 Name: lastfm-player
3 Version: 2.1.36
4 Release: %mkrel 2
5 Epoch: 1
6 License: GPLv2+
7 Group: Sound/Players
8 Url: http://www.last.fm/download/
9 # github release:
10 # https://github.com/lastfm/lastfm-desktop/archive/%version.tar.gz
11 Source0: lastfm-desktop-%version.tar.gz
12 Source1: icons.tar.gz
13 Patch0: lastfm-desktop-2.1.36-ffmpeg2-build-fix.patch
14 BuildRequires: qt4-devel >= 2:4.8.0 qt4-linguist
15 BuildRequires: qtwebkit-devel
16 BuildRequires: libalsa-devel
17 BuildRequires: fftw3-devel libsamplerate-devel
18 BuildRequires: libgpod-devel
19 BuildRequires: liblastfm-devel >= 1.0.6
20 BuildRequires: ffmpeg-devel
21 Provides: player = %{version}-%{release}
22 Obsoletes: player < %{version}-%{release}
23 Requires: phonon-backend
24
25 %description
26 This is the custom radio player program for last.fm, formerly known as
27 audioscrobbler.com.
28
29 %prep
30 %setup -q -a 1 -n lastfm-desktop-%version
31 %apply_patches
32
33 chmod -R +r .
34 perl -pi -e "s|\r\n|\n|" ChangeLog.txt
35
36 %build
37 %{qt4dir}/bin/qmake -r -config release
38 %make CXX="g++ -fPIC $(pkg-config --cflags libgpod-1.0)" libdir=%{_libdir} datadir=%{_datadir}
39
40 cd i18n
41 %{qt4dir}/bin/lrelease *.ts
42
43 %install
44 rm -rf %{buildroot}
45 mkdir -p %{buildroot}{%_bindir,%{_libdir}/}
46 cp -r _bin %{buildroot}%{_libdir}/%{name}
47 cat << EOF > %{buildroot}%_bindir/%{name}
48 #!/bin/sh
49 RUNDIR="%{_libdir}/%{name}"
50 export LD_LIBRARY_PATH="\${RUNDIR}\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}"
51 exec "\${RUNDIR}/lastfm-scrobbler" "$@"
52 EOF
53 install -d -m 755 %{buildroot}%{_datadir}/services
54 cat > %{buildroot}%{_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
68 mkdir -p %{buildroot}%{_datadir}/applications
69 # (cg) Ensure the name is last.fm.desktop to match the binary name.
70 # This allows PulseAudio to parse the .desktop file for extra metadata.
71 cat > %{buildroot}%{_datadir}/applications/last.fm.desktop << EOF
72 [Desktop Entry]
73 Name=Last.FM Player
74 Comment=Play the last.fm internet radio
75 Exec=%{name} %U
76 Icon=lastfm
77 Terminal=false
78 Type=Application
79 StartupNotify=true
80 Categories=Qt;AudioVideo;Audio;Player;X-MandrivaLinux-CrossDesktop;
81 EOF
82
83 mkdir -p %{buildroot}%{_datadir}/icons
84 cp -r icons/hicolor %{buildroot}%{_datadir}/icons/hicolor
85 find %{buildroot} -name .svn |xargs rm -rf
86
87 mkdir -p %buildroot%_libdir/%name/i18n
88 cp i18n/*.qm %buildroot%_libdir/%name/i18n
89 cp app/client/Last.fm\ Scrobbler.css %buildroot%_libdir/%name
90
91 #gw else on my GNOME machine the phonon backend isn't found:
92 ln -s %_libdir/kde4/plugins/phonon_backend/ %buildroot%_libdir/%name
93
94 %files
95 %doc COPYING README.md
96 %attr(755,root,root) %_bindir/%{name}
97 %{_datadir}/applications/*.desktop
98 %{_datadir}/icons/hicolor/*/apps/lastfm*
99 %{_libdir}/%{name}
100 %{_datadir}/services/lastfm.protocol

  ViewVC Help
Powered by ViewVC 1.1.28