summaryrefslogtreecommitdiff
blob: 464ac6c976ca14d50a484027d9c6720ce7c7c9b1 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/amazonmp3/amazonmp3-1.0.3-r2.ebuild,v 1.2 2009/03/25 09:59:09 remi Exp $

EAPI=2

inherit rpm fdo-mime multilib

DESCRIPTION="AmazonMp3 is a download manager which interfaces with the http://mp3.amazon.com music store"
HOMEPAGE="http://www.amazon.com/gp/dmusic/help/amd.html/"
SRC_URI="amazonmp3.rpm"
RESTRICT="fetch strip"

LICENSE="amazonmp3"
SLOT="0"
KEYWORDS="~x86 -*"
IUSE=""

RDEPEND="dev-cpp/gtkmm:2.4
	net-misc/curl
	dev-libs/openssl
	=dev-libs/boost-1.34*"
DEPEND=""

S="${WORKDIR}/usr/"

pkg_nofetch() {
	einfo "Due to licensing restrictions, you must download this software from"
	einfo "amazon.com manually:"
	einfo " - Visit ${HOMEPAGE}"
	einfo " - Agree to the Terms of Service, click the agreement box, and"
	einfo "   download the version for 'Fedora 8'.  It will be called"
	einfo "   'amazonmp3.rpm'"
	einfo " - Copy 'amazonmp3.rpm' into ${DISTDIR}"
	einfo " - Run 'ebuild amazonmp3' again."
	einfo "If the version does not match or if you get any errors about the"
	einfo "rpm you just downloaded, file a bug at http://bugs.gentoo.org, and"
	einfo "be sure to include the output of 'file amazonmp3.rpm'"
}

src_install() {
	# Their binary, compiled for Fedora 8, needs some odd library names, so we
	# symlink them:
	dosym libboost_date_time.so /usr/$(get_libdir)/libboost_date_time.so.3
	dosym libboost_iostreams.so /usr/$(get_libdir)/libboost_iostreams.so.3
	dosym libboost_signals.so /usr/$(get_libdir)/libboost_signals.so.3
	dosym libboost_thread-mt.so /usr/$(get_libdir)/libboost_thread-mt.so.3
	dosym libcrypto.so /usr/$(get_libdir)/libcrypto.so.6
	dosym libssl.so /usr/$(get_libdir)/libssl.so.6

	dobin bin/amazonmp3 || die "dobin failed"

	insinto "/usr/share"
	doins -r share/{applications,pixmaps,mime,mime-info,mimelnk} || die "doins failed"

	dodoc share/doc/amazonmp3/releasenotes
	dohtml share/doc/amazonmp3/*.html
}

pkg_postinst() {
	fdo-mime_desktop_database_update
	fdo-mime_mime_database_update
}

pkg_postrm() {
	fdo-mime_desktop_database_update
	fdo-mime_mime_database_update
}