| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-p2p/rtorrent/rtorrent-0.8.9.ebuild,v 1.7 2012/04/10 21:53:47 sochotnicky Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
inherit autotools-utils eutils
|
| 8 |
|
| 9 |
DESCRIPTION="BitTorrent Client using libtorrent"
|
| 10 |
HOMEPAGE="http://libtorrent.rakshasa.no/"
|
| 11 |
SRC_URI="http://libtorrent.rakshasa.no/downloads/${P}.tar.gz"
|
| 12 |
|
| 13 |
LICENSE="GPL-2"
|
| 14 |
SLOT="0"
|
| 15 |
KEYWORDS="amd64 ~arm hppa ~ia64 ~ppc ppc64 ~sparc x86 ~x86-fbsd"
|
| 16 |
IUSE="color daemon debug ipv6 test xmlrpc"
|
| 17 |
|
| 18 |
COMMON_DEPEND="~net-libs/libtorrent-0.12.${PV##*.}
|
| 19 |
>=dev-libs/libsigc++-2.2.2:2
|
| 20 |
>=net-misc/curl-7.19.1
|
| 21 |
sys-libs/ncurses
|
| 22 |
xmlrpc? ( dev-libs/xmlrpc-c )"
|
| 23 |
RDEPEND="${COMMON_DEPEND}
|
| 24 |
daemon? ( app-misc/screen )"
|
| 25 |
DEPEND="${COMMON_DEPEND}
|
| 26 |
test? ( dev-util/cppunit )
|
| 27 |
virtual/pkgconfig"
|
| 28 |
|
| 29 |
RESTRICT=test
|
| 30 |
|
| 31 |
src_prepare() {
|
| 32 |
local PATCHES=(
|
| 33 |
"${FILESDIR}"/${P}-ncurses.patch
|
| 34 |
)
|
| 35 |
autotools-utils_src_prepare
|
| 36 |
|
| 37 |
use color && EPATCH_OPTS="-p1" epatch "${FILESDIR}"/${P}-canvas-fix.patch
|
| 38 |
}
|
| 39 |
|
| 40 |
src_configure() {
|
| 41 |
local myeconfargs=(
|
| 42 |
--disable-dependency-tracking
|
| 43 |
$(use_enable debug)
|
| 44 |
$(use_enable ipv6)
|
| 45 |
$(use_with xmlrpc xmlrpc-c)
|
| 46 |
)
|
| 47 |
|
| 48 |
autotools-utils_src_configure
|
| 49 |
}
|
| 50 |
|
| 51 |
src_install() {
|
| 52 |
local DOCS=( AUTHORS README TODO doc/rtorrent.rc )
|
| 53 |
|
| 54 |
autotools-utils_src_install
|
| 55 |
doman doc/rtorrent.1
|
| 56 |
|
| 57 |
if use daemon; then
|
| 58 |
newinitd "${FILESDIR}/rtorrentd.init" rtorrentd
|
| 59 |
newconfd "${FILESDIR}/rtorrentd.conf" rtorrentd
|
| 60 |
fi
|
| 61 |
}
|
| 62 |
|
| 63 |
pkg_postinst() {
|
| 64 |
if use color; then
|
| 65 |
elog "rtorrent colors patch"
|
| 66 |
elog "Set colors using the options below in .rtorrent.rc:"
|
| 67 |
elog "Options: done_fg_color, done_bg_color, active_fg_color, active_bg_color"
|
| 68 |
elog "Colors: 0 = black, 1 = red, 2 = green, 3 = yellow, 4 = blue,"
|
| 69 |
elog "5 = magenta, 6 = cyan and 7 = white"
|
| 70 |
elog "Example: done_fg_color = 1"
|
| 71 |
fi
|
| 72 |
}
|