1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-sound/lastfmplayer/lastfmplayer-1.3.1.0.ebuild,v 1.1 2007/07/27 20:06:20 peper Exp $
7 MY_P
="${P/lastfmplayer/last.fm}"
9 DESCRIPTION
="The player allows you to listen to last.fm radio streams"
10 HOMEPAGE
="http://www.last.fm/help/player"
11 SRC_URI
="http://static.last.fm/client/Linux/${MY_P}.src.tar.bz2"
16 KEYWORDS
="~x86 ~ppc ~amd64"
19 S
="${WORKDIR}/${MY_P}"
21 DEPEND
="$(qt4_min_version 4.2)
27 epatch
${FILESDIR}/qt4.
patch
31 econf || die
"configure failed"
32 emake qmake_all || die
"emake qmake_all failed"
33 emake || die
"emake failed"
38 dodoc ChangeLog README
40 # The root at which the player, data, and cache
42 local destination
="/opt/lastfm"
45 # Make ${destination} writable by audio group
46 diropts
-m0775 -g audio
50 cp -R * ${D}/${destination}
52 # Make a folder such that album art cache works
53 diropts
-m0775 -g audio
54 dodir
${destination}/cache
55 keepdir
${destination}/cache
58 make_wrapper lastfm .
/last.fm
${destination} ${destination}
59 newicon data
/icons
/as.png lastfm.png
60 make_desktop_entry lastfm
"Last.fm Player" lastfm.png
62 # make sure no hanging instance of lastfm is running
63 sed -i -e 's:exec:if ! ps aux | grep "^$USER.*last.fm.app" | grep Sl >/dev/null 2>\&1; then killall -u $USER last.fm.app >/dev/null 2>\&1; fi\nexec:' \
64 ${D}/usr
/bin
/lastfm || die
"sed failed"
66 insinto
/usr
/share
/services
67 doins
${FILESDIR}/lastfm.protocol
71 elog
"To use the Last.fm player with a mozilla based browser:"
72 elog
" 1. Go to about:config in the browser"
73 elog
" 2. Right-click on the page"
74 elog
" 3. Select New and then String"
75 elog
" 4. For the name: network.protocol-handler.app.lastfm"
76 elog
" 5. For the value: /usr/bin/lastfm"
78 elog
"If you experience awkward fonts or widgets, try running qtconfig."