1 |
# Copyright 1999-2009 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.1.2.ebuild,v 1.1 2009/08/24 12:22:41 chainsaw Exp $ |
4 |
|
5 |
inherit eutils |
6 |
|
7 |
DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 or IPv6" |
8 |
HOMEPAGE="http://bird.network.cz" |
9 |
SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz" |
10 |
LICENSE="GPL-2" |
11 |
|
12 |
SLOT="0" |
13 |
KEYWORDS="~amd64" |
14 |
IUSE="debug ipv6" |
15 |
|
16 |
RDEPEND="sys-libs/ncurses |
17 |
sys-libs/readline |
18 |
${DEPEND}" |
19 |
DEPEND="sys-devel/flex |
20 |
sys-devel/bison |
21 |
sys-devel/m4" |
22 |
|
23 |
src_unpack() { |
24 |
unpack ${A} |
25 |
cd "${S}" |
26 |
epatch "${FILESDIR}/${PV}-nostrip.patch" |
27 |
} |
28 |
|
29 |
src_compile() { |
30 |
econf \ |
31 |
--enable-client \ |
32 |
$(use_enable debug) \ |
33 |
$(use_enable ipv6) \ |
34 |
|| die "Configuration stage failed" |
35 |
emake || die "Compilation stage failed" |
36 |
} |
37 |
|
38 |
src_install() { |
39 |
emake DESTDIR="${D}" install || die |
40 |
if use ipv6; then |
41 |
# The only thing worse then not supplying |
42 |
# a sample configuration file to a user is |
43 |
# wasting his/her time with a totally |
44 |
# broken one. |
45 |
rm "${D}/etc/bird6.conf" |
46 |
newinitd "${FILESDIR}/initd-v6-${P}" bird6 |
47 |
else |
48 |
newinitd "${FILESDIR}/initd-v4-${P}" bird |
49 |
fi |
50 |
} |
51 |
|
52 |
pkg_postinst() { |
53 |
if use ipv6; then |
54 |
elog "Please note that only the IPv6 versions of the BIRD client & daemon have been installed." |
55 |
else |
56 |
elog "Please note that only the IPv4 versions of the BIRD client & daemon have been installed." |
57 |
fi |
58 |
elog "BIRDs build system is not currently suited to providing both." |
59 |
} |