Gentoo Archives: gentoo-commits

From: "Markos Chandras (hwoarang)" <hwoarang@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-sound/lastfmplayer: lastfmplayer-1.5.4.27091-r2.ebuild ChangeLog
Date: Fri, 30 Dec 2011 09:49:48
Message-Id: 20111230094931.44A152004B@flycatcher.gentoo.org
1 hwoarang 11/12/30 09:49:31
2
3 Modified: ChangeLog
4 Added: lastfmplayer-1.5.4.27091-r2.ebuild
5 Log:
6 Allow arguments when launching lastfm from desktop file. Bug #395277
7
8 (Portage version: 2.2.0_alpha83/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.66 media-sound/lastfmplayer/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/lastfmplayer/ChangeLog?rev=1.66&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/lastfmplayer/ChangeLog?rev=1.66&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/lastfmplayer/ChangeLog?r1=1.65&r2=1.66
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-sound/lastfmplayer/ChangeLog,v
20 retrieving revision 1.65
21 retrieving revision 1.66
22 diff -u -r1.65 -r1.66
23 --- ChangeLog 7 Aug 2011 12:38:20 -0000 1.65
24 +++ ChangeLog 30 Dec 2011 09:49:31 -0000 1.66
25 @@ -1,6 +1,12 @@
26 # ChangeLog for media-sound/lastfmplayer
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-sound/lastfmplayer/ChangeLog,v 1.65 2011/08/07 12:38:20 hwoarang Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-sound/lastfmplayer/ChangeLog,v 1.66 2011/12/30 09:49:31 hwoarang Exp $
30 +
31 +*lastfmplayer-1.5.4.27091-r2 (30 Dec 2011)
32 +
33 + 30 Dec 2011; Markos Chandras <hwoarang@g.o>
34 + +lastfmplayer-1.5.4.27091-r2.ebuild:
35 + Allow arguments when launching lastfm from desktop file. Bug #395277
36
37 07 Aug 2011; Markos Chandras <hwoarang@g.o>
38 -lastfmplayer-1.5.4.26862-r3.ebuild, -lastfmplayer-1.5.4.27091.ebuild:
39
40
41
42 1.1 media-sound/lastfmplayer/lastfmplayer-1.5.4.27091-r2.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/lastfmplayer/lastfmplayer-1.5.4.27091-r2.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/lastfmplayer/lastfmplayer-1.5.4.27091-r2.ebuild?rev=1.1&content-type=text/plain
46
47 Index: lastfmplayer-1.5.4.27091-r2.ebuild
48 ===================================================================
49 # Copyright 1999-2011 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/media-sound/lastfmplayer/lastfmplayer-1.5.4.27091-r2.ebuild,v 1.1 2011/12/30 09:49:31 hwoarang Exp $
52
53 EAPI=2
54 inherit eutils multilib toolchain-funcs qt4-r2
55
56 MY_P="${P/lastfmplayer/lastfm}+dfsg"
57
58 DESCRIPTION="A player for last.fm radio streams"
59 HOMEPAGE="http://www.last.fm/help/player
60 http://www.mehercule.net/staticpages/index.php/lastfm"
61 SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/lastfm-${PV}+dfsg.tar.gz
62 http://dev.gentoo.org/~hwoarang/distfiles/lastfm_${PV}+dfsg-2.debian.tar.gz
63 dbus? ( http://glue.umd.edu/~rossatok/dbusextension-2.0.tar.bz2 )"
64
65 LICENSE="GPL-2"
66 SLOT="0"
67 KEYWORDS="~amd64 ~arm ~ppc ~x86"
68 IUSE="dbus ipod"
69
70 RDEPEND="x11-libs/qt-gui:4
71 x11-libs/qt-sql:4
72 media-libs/libsamplerate
73 sci-libs/fftw
74 media-libs/libmad
75 ipod? ( >=media-libs/libgpod-0.5.2 )
76 media-libs/alsa-lib"
77 DEPEND="${RDEPEND}
78 app-arch/sharutils"
79
80 S=${WORKDIR}/${MY_P}
81
82 src_prepare() {
83 qt4-r2_src_prepare
84 # Use a different extensions path
85 epatch "${FILESDIR}"/${PN}-extensions-path.patch
86 einfo "Applying Debian patchset"
87 sed -i "/^tray-icon-size.diff/d" "${WORKDIR}"/debian/patches/series
88 cd "${S}"
89 for i in $( < "${WORKDIR}"/debian/patches/series); do
90 epatch "${WORKDIR}"/debian/patches/$i
91 done
92 if ! use ipod ; then
93 sed -i '/src\/mediadevices\/ipod/d' LastFM.pro || die "sed failed"
94 fi
95 #fix plugin search path for multilib support
96 sed -i -e "s:/usr/lib/:/usr/$(get_libdir)/:g" \
97 "${S}"/src/libMoose/MooseCommon.cpp
98 if use dbus; then
99 mv "${WORKDIR}"/dbus "${S}"/src/dbus
100 sed -i -e "/include/s:../definitions.pro.in:definitions.pro.in:" \
101 -e "/TARGET/s:dbusextension:LastFmDbusExtension:" \
102 "${S}"/src/dbus/dbusextension.pro
103 fi
104 }
105
106 src_configure() {
107 if use dbus; then
108 pushd "${S}"/src/dbus
109 eqmake4 dbusextension.pro
110 popd >> /dev/null
111 fi
112 qt4-r2_src_configure
113 }
114
115 src_compile() {
116 emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" || die "emake failed"
117 if use dbus; then
118 einfo "Building DBUS plugin"
119 emake -C "${S}"/src/dbus || die "failed to build dbus extension"
120 fi
121 cd i18n; lrelease *.ts
122 }
123
124 src_install() {
125 cd "${WORKDIR}"
126 # Docs
127 dodoc "${S}"/ChangeLog.txt "${S}"/README debian/README.source \
128 || die "dodoc failed"
129 doman debian/lastfm.1 || die "doman failed"
130
131 # Copied from debian/rules
132 insinto /usr/share
133 doins -r debian/package-files/share/icons || die "failed to install icons"
134 insinto /usr/share/lastfm/icons
135 doins "${S}"/bin/data/icons/*.png \
136 || die "failed to install application icons"
137 insinto /usr/share/lastfm
138 doins "${S}"/bin/data/*.png || die "failed to install icons"
139 dodir /usr/$(get_libdir)/lastfm_services/
140 insinto /usr/$(get_libdir)/lastfm_services/
141 insopts -m0755
142 doins -r "${S}"/bin/lastfm_services/*.so || die "failed to install plugins"
143 if use dbus; then
144 insinto /usr/$(get_libdir)/lastfm_services/extensions/
145 insopts -m0755
146 doins "${S}"/bin/lastfm_services/extensions/*.so || die
147 fi
148 insinto /usr/$(get_libdir)
149 insopts -m0755
150 doins "${S}"/bin/libLastFmTools.so.1* || die "failed to install library"
151 doins "${S}"/bin/libMoose.so.1* || die "failed to install library"
152 #fix symlinks
153 cd "${D}"/usr/$(get_libdir)/
154 ln -sfn libLastFmTools.so.1.0.0 libLastFmTools.so.1
155 ln -sfn libLastFmTools.so.1.0.0 libLastFmTools.so.1.0
156 ln -sfn libMoose.so.1.0.0 libMoose.so.1
157 ln -sfn libMoose.so.1.0.0 libMoose.so.1.0
158 cd "${WORKDIR}"
159 newbin "${S}"/bin/last.fm lastfm || die "newbin failed"
160 insinto /usr/share/lastfm/i18n
161 doins "${S}"/i18n/*.qm || die "failed to install translations"
162 fperms 755 /usr/bin/lastfm
163 rm -f "${D}"/usr/share/lastfm/icons/{*profile24,systray_mac}.png
164 # create desktop entry
165 doicon "${WORKDIR}"/debian/package-files/share/icons/hicolor/48x48/apps/lastfm.png
166 # Allow arguments when launching application. Bug #395277
167 make_desktop_entry lastfm "Last.fm Player" lastfm
168 sed -i -e "/Exec/s:lastfm:& %U:" \
169 "${D}"/usr/share/applications/lastfm-${PN}.desktop || die
170 }
171
172 pkg_postinst() {
173 elog "To use the Last.fm player with a mozilla based browser:"
174 elog " 1. Install gnome-base/gconf"
175 elog " 2. gconftool-2 -t string -s \
176 /desktop/gnome/url-handlers/lastfm/command \"/usr/bin/lastfm %s\""
177 elog " 3. gconftool-2 -s \
178 /desktop/gnome/url-handlers/lastfm/needs_terminal false -t bool"
179 elog " 4. gconftool-2 -t bool -s \
180 /desktop/gnome/url-handlers/lastfm/enabled true"
181 elog
182 elog "If you experience awkward fonts or widgets, try running qtconfig."
183 }