blob: 51b67efac83efa73c653b038260b59a309788c2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/lastfmplayer/lastfmplayer-1.5.1.31879-r2.ebuild,v 1.1 2009/02/17 20:07:23 hwoarang Exp $
EAPI="2"
inherit eutils multilib qt4
MY_P="${P/lastfmplayer/lastfm}.dfsg"
DESCRIPTION="A player for last.fm radio streams"
HOMEPAGE="http://www.last.fm/help/player"
SRC_URI="mirror://debian/pool/main/l/lastfm/lastfm_${PV}.dfsg.orig.tar.gz
mirror://debian/pool/main/l/lastfm/lastfm_${PV}.dfsg-1.diff.gz"
#http://cdn.last.fm/client/src/${MY_P}.src.tar.bz2
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="ipod"
RESTRICT="mirror"
RDEPEND="|| ( ( x11-libs/qt-gui:4 x11-libs/qt-sql:4 ) x11-libs/qt:4 )
media-libs/libsamplerate
sci-libs/fftw
media-libs/libmad
ipod? ( >=media-libs/libgpod-0.5.2 )
media-libs/alsa-lib"
DEPEND="${RDEPEND}
app-arch/sharutils"
S="${WORKDIR}/${MY_P}"
src_prepare() {
cd "${WORKDIR}"
epatch lastfm_${PV}.dfsg-1.diff
cd "${S}"
for i in $(< debian/patches/series); do
epatch debian/patches/$i
done
if ! use ipod ; then
sed -i '/src\/mediadevices\/ipod/d' LastFM.pro || die "sed failed"
fi
}
src_compile() {
emake src/Makefile || die "emake src/Makefile failed"
epatch "${FILESDIR}/makefile-qt45.patch"
emake || die "emake failed"
cd i18n; lrelease *.ts
}
src_install() {
# Docs
dodoc ChangeLog README debian/README.source || die "dodoc failed"
doman debian/lastfm.1 || die "doman failed"
# Copied from debian/rules
uudecode -o - debian/icons.tar.gz.uu | tar -xzf -
uudecode -o - debian/trayicons22.tar.gz.uu | tar -xzf -
insinto /usr/share
doins -r icons
insinto /usr/share/lastfm/icons
doins user_*.png
sed -i -e "s,/usr/lib,/usr/$(get_libdir),g" debian/lastfm.install
# make directories
for i in $(<debian/lastfm.install); do [ ${i:0:1} == / ] && dodir $i; done
# debian installation
sed -i -e "s:^:mv :" -e 's: /:${D}/:' debian/lastfm.install
bash debian/lastfm.install
# copied..
mv "${D}"/usr/bin/lastfm.sh "${D}"/usr/bin/lastfm
fperms 755 /usr/bin/lastfm
rm -f "${D}"/usr/share/lastfm/icons/{*profile24,systray_mac}.png
}
pkg_postinst() {
elog "To use the Last.fm player with a mozilla based browser:"
elog " 1. Go to about:config in the browser"
elog " 2. Right-click on the page"
elog " 3. Select New and then String"
elog " 4. For the name: network.protocol-handler.app.lastfm"
elog " 5. For the value: /usr/bin/lastfm"
elog
elog "If you experience awkward fonts or widgets, try running qtconfig."
}
|