source: media-sound/lastfmplayer/lastfmplayer-2.1.30.ebuild @ 614fd62

Revision 614fd62, 4.6 KB checked in by Mario Fetka <mario.fetka@…>, 7 years ago (diff)

redigest and add

  • Property mode set to 100644
Line 
1# Copyright 1999-2012 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.5.4.27091-r3.ebuild,v 1.2 2012/08/26 00:36:09 hwoarang Exp $
4
5EAPI=4
6inherit eutils multilib toolchain-funcs qt4-r2
7
8DESCRIPTION="A player for last.fm radio streams"
9HOMEPAGE="http://www.last.fm/help/player
10        http://www.mehercule.net/staticpages/index.php/lastfm"
11SRC_URI="http://cdn.last.fm/client/Linux/Last.fm-${PV}.tar.bz2
12        dbus? ( http://glue.umd.edu/~rossatok/dbusextension-2.0.tar.bz2 )"
13
14LICENSE="GPL-2"
15SLOT="0"
16KEYWORDS="amd64 ~arm ppc x86"
17IUSE="dbus ipod"
18
19RDEPEND="x11-libs/qt-gui:4
20        x11-libs/qt-sql:4
21        media-libs/libsamplerate
22        sci-libs/fftw
23        media-libs/libmad
24        ipod? ( >=media-libs/libgpod-0.5.2 )
25        media-libs/alsa-lib
26        media-libs/liblastfm[fingerprint(+)]"
27DEPEND="${RDEPEND}
28        app-arch/sharutils"
29
30S=${WORKDIR}/lastfm-desktop-${PV}
31
32src_prepare() {
33        qt4-r2_src_prepare
34        # Use a different extensions path
35#       epatch "${FILESDIR}"/${PN}-extensions-path.patch
36#       einfo "Applying Debian patchset"
37#       sed -i "/^tray-icon-size.diff/d" "${WORKDIR}"/debian/patches/series
38#       cd "${S}"
39#       for i in $( < "${WORKDIR}"/debian/patches/series); do
40#               epatch "${WORKDIR}"/debian/patches/$i
41#       done
42#       if ! use ipod ; then
43#               sed -i '/src\/mediadevices\/ipod/d' LastFM.pro || die "sed failed"
44#       fi
45        #fix plugin search path for multilib support
46#       sed -i -e "s:/usr/lib/:/usr/$(get_libdir)/:g" \
47#               "${S}"/src/libMoose/MooseCommon.cpp
48#       if use dbus; then
49#               mv "${WORKDIR}"/dbus "${S}"/src/dbus
50#               sed -i -e "/include/s:../definitions.pro.in:definitions.pro.in:" \
51#                       -e "/TARGET/s:dbusextension:LastFmDbusExtension:" \
52#                       "${S}"/src/dbus/dbusextension.pro
53#       fi
54
55        # only glib.h can be included directly in >glib-2.32
56        epatch "${FILESDIR}"/${P}-glib.h.patch
57}
58
59src_configure() {
60#       if use dbus; then
61#               pushd "${S}"/src/dbus
62#               eqmake4 dbusextension.pro
63#               popd >> /dev/null
64#       fi
65        qt4-r2_src_configure
66}
67
68src_compile() {
69        emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" || die "emake failed"
70#       if use dbus; then
71#               einfo "Building DBUS plugin"
72#               emake -C "${S}"/src/dbus || die "failed to build dbus extension"
73#       fi
74        cd i18n; lrelease *.ts
75}
76
77src_install() {
78        cd "${WORKDIR}"
79        # Docs
80#       dodoc "${S}"/ChangeLog.txt "${S}"/README debian/README.source \
81#               || die "dodoc failed"
82#       doman debian/lastfm.1 || die "doman failed"
83
84        # Copied from debian/rules
85#       insinto /usr/share
86#       doins -r debian/package-files/share/icons || die "failed to install icons"
87#       insinto /usr/share/lastfm/icons
88#       doins "${S}"/bin/data/icons/*.png \
89#               || die "failed to install application icons"
90#       insinto /usr/share/lastfm
91#       doins "${S}"/bin/data/*.png || die "failed to install icons"
92#       dodir /usr/$(get_libdir)/lastfm_services/
93#       insinto /usr/$(get_libdir)/lastfm_services/
94#       insopts -m0755
95#       doins -r "${S}"/bin/lastfm_services/*.so || die "failed to install plugins"
96#       if use dbus; then
97#               insinto /usr/$(get_libdir)/lastfm_services/extensions/
98#               insopts -m0755
99#               doins "${S}"/bin/lastfm_services/extensions/*.so || die
100#       fi
101#       insinto /usr/$(get_libdir)
102#       insopts -m0755
103#       doins "${S}"/bin/liblistener.so.1* || die "failed to install library"
104#       doins "${S}"/bin/liblogger.so.1* || die "failed to install library"
105#       doins "${S}"/bin/liblogger.so.1* || die "failed to install library"
106        dolib.so "${S}"/_bin/*.so*
107        #fix symlinks
108#       cd "${D}"/usr/$(get_libdir)/
109#       ln -sfn libLastFmTools.so.1.0.0 libLastFmTools.so.1
110#       ln -sfn libLastFmTools.so.1.0.0 libLastFmTools.so.1.0
111#       ln -sfn libMoose.so.1.0.0 libMoose.so.1
112#       ln -sfn libMoose.so.1.0.0 libMoose.so.1.0
113#       cd "${WORKDIR}"
114        newbin "${S}"/_bin/Last.fm* lastfm || die "newbin failed"
115        insinto /usr/share/lastfm/i18n
116        doins "${S}"/i18n/*.qm || die "failed to install translations"
117        fperms 755 /usr/bin/lastfm
118#       rm -f "${D}"/usr/share/lastfm/icons/{*profile24,systray_mac}.png
119        # create desktop entry
120#       doicon "${WORKDIR}"/debian/package-files/share/icons/hicolor/48x48/apps/lastfm.png
121        # Allow arguments when launching application. Bug #395277
122        make_desktop_entry lastfm "Last.fm Player" lastfm
123        sed -i -e "/^Exec/s:lastfm:& %U:" \
124                "${D}"/usr/share/applications/lastfm-${PN}.desktop || die
125}
126
127pkg_postinst() {
128        elog "To use the Last.fm player with a mozilla based browser:"
129        elog " 1. Install gnome-base/gconf"
130        elog " 2. gconftool-2 -t string -s \
131/desktop/gnome/url-handlers/lastfm/command \"/usr/bin/lastfm %s\""
132        elog " 3. gconftool-2 -s \
133/desktop/gnome/url-handlers/lastfm/needs_terminal false -t bool"
134        elog " 4. gconftool-2 -t bool -s \
135/desktop/gnome/url-handlers/lastfm/enabled true"
136        elog
137        elog "If you experience awkward fonts or widgets, try running qtconfig."
138}
Note: See TracBrowser for help on using the repository browser.