1 |
# Copyright 1999-2010 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/bird/bird-1.2.4.ebuild,v 1.2 2010/09/26 09:16:30 maekke Exp $ |
4 |
|
5 |
EAPI=1 |
6 |
|
7 |
inherit base autotools |
8 |
|
9 |
DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 or IPv6" |
10 |
HOMEPAGE="http://bird.network.cz" |
11 |
SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz" |
12 |
LICENSE="GPL-2" |
13 |
|
14 |
SLOT="0" |
15 |
KEYWORDS="~amd64 ~x86" |
16 |
IUSE="debug ipv6" |
17 |
|
18 |
RDEPEND="sys-libs/ncurses |
19 |
sys-libs/readline |
20 |
${DEPEND}" |
21 |
DEPEND="sys-devel/flex |
22 |
sys-devel/bison |
23 |
sys-devel/m4" |
24 |
|
25 |
PATCHES=( |
26 |
"${FILESDIR}/${PV}-v4-v6-build.patch" |
27 |
) |
28 |
|
29 |
src_prepare() { |
30 |
base_src_prepare |
31 |
eautoreconf |
32 |
} |
33 |
|
34 |
src_compile() { |
35 |
econf \ |
36 |
--enable-client \ |
37 |
--enable-ipv4 \ |
38 |
--disable-ipv6 \ |
39 |
$(use_enable debug) \ |
40 |
|| die "V4 configuration stage failed" |
41 |
emake || die "V4 compilation stage failed" |
42 |
if use ipv6; then |
43 |
emake almost-clean |
44 |
econf \ |
45 |
--enable-client \ |
46 |
--enable-ipv6 \ |
47 |
--disable-ipv4 \ |
48 |
$(use_enable debug) \ |
49 |
|| die "V6 configuration stage failed" |
50 |
emake || die "V6 compilation stage failed" |
51 |
fi |
52 |
} |
53 |
|
54 |
src_install() { |
55 |
if use ipv6; then |
56 |
dobin birdc6 |
57 |
dosbin bird6 |
58 |
newinitd "${FILESDIR}/initd-v6-${P}" bird6 || die "V6 init script installation failed" |
59 |
fi |
60 |
dobin birdc |
61 |
dosbin bird |
62 |
newinitd "${FILESDIR}/initd-v4-${P}" bird || die "V4 init script installation failed" |
63 |
dodoc doc/bird.conf.example || die "configuration example installation failed" |
64 |
} |