blob: 2e5c561ef3a7a0e95105c1d34927231d5e987c0c (
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
89
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-p2p/btg/btg-0.9.6.ebuild,v 1.1 2007/10/14 23:37:13 angelos Exp $
inherit eutils
DESCRIPTION="bittorrent client using rb_libtorrent"
HOMEPAGE="http://btg.berlios.de/"
SRC_URI="mirror://berlios/${PN}/${P}-p1.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="debug doc event-callback gtk minimal ncurses session test upnp webinterface"
RDEPEND="dev-libs/boost
dev-libs/expat
dev-libs/libgcrypt
dev-libs/libgpg-error
dev-libs/libtasn1
dev-util/dialog
net-libs/gnutls
net-libs/rb_libtorrent
gtk? ( >=dev-cpp/gtkmm-2.4
x11-libs/pango )
webinterface? ( =dev-lang/php-5* )"
DEPEND="${RDEPEND}
>=dev-util/pkgconfig-0.21
doc? ( app-doc/doxygen )"
S="${WORKDIR}/${PN}-${PV/_rc*}"
pkg_setup() {
if ! built_with_use --missing true "dev-libs/boost" threads && \
! built_with_use --missing true "dev-libs/boost" threads-only ; then
einfo
einfo "Compile dev-libs/boost with USE=threads or USE=threads-only"
einfo "if you want threading support for btg"
einfo
fi
}
src_compile() {
local myconf=""
if built_with_use --missing true "dev-libs/boost" threads || \
built_with_use --missing true "dev-libs/boost" threads-only ; then
myconf="--with-boost-iostreams=boost_iostreams-mt \
--with-boost-filesystem=boost_filesystem-mt \
--with-boost-thread=boost_thread-mt \
--with-boost-date-time=boost_date_time-mt \
--with-boost-program_options=boost_program_options-mt"
fi
econf \
$(use_enable debug) \
$(use_enable gtk gui) \
$(use_enable ncurses cli) \
$(use_enable upnp) \
$(use_enable event-callback)
$(use_enable session session-saving) \
$(use_enable test unittest) \
$(use_enable webinterface www) \
$(use_enable !minimal command-list) \
${myconf} \
--disable-dependency-tracking \
|| die
emake || die
}
src_install() {
emake DESTDIR="${D}" install || die
dodoc AUTHORS ChangeLog README TODO
newinitd "${FILESDIR}/btgd-init" ${PN}
newconfd "${FILESDIR}/btgd-confd" ${PN}
}
pkg_postinst() {
enewgroup p2p
enewuser p2p -1 -1 /home/p2p p2p
einfo
einfo "BTG needs a daemon.ini and client.ini, to create them run btg-config"
einfo "and put them in the user running btg (/home/p2p by default)"
einfo
}
|