Added new ebuilds app-crypt/qca-{cyrus-sasl,pkcs11}.
[underlay.git] / media-sound / lastfmplayer / lastfmplayer-1.3.1.0.ebuild
blob4e55db8c584932d439bf4864f90b0283c9811a18
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 $
5 inherit eutils qt4
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"
12 RESTRICT="mirror"
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~x86 ~ppc ~amd64"
17 IUSE=""
19 S="${WORKDIR}/${MY_P}"
21 DEPEND="$(qt4_min_version 4.2)
22 media-libs/alsa-lib"
24 src_unpack() {
25 unpack ${A}
26 cd "${S}"
27 epatch ${FILESDIR}/qt4.patch
30 src_compile() {
31 econf || die "configure failed"
32 emake qmake_all || die "emake qmake_all failed"
33 emake || die "emake failed"
36 src_install() {
37 # Docs
38 dodoc ChangeLog README
40 # The root at which the player, data, and cache
41 # are to be installed
42 local destination="/opt/lastfm"
43 cd bin
45 # Make ${destination} writable by audio group
46 diropts -m0775 -g audio
47 dodir ${destination}
49 # Install the player
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
57 # Icon, menu, protcol
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
70 pkg_postinst() {
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"
77 elog
78 elog "If you experience awkward fonts or widgets, try running qtconfig."