summaryrefslogtreecommitdiff
blob: 113220b9cf48d5ddfc21714b4a9d70ef85bb7c08 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/zebra/zebra-0.93b.ebuild,v 1.7 2004/06/25 00:22:04 agriffis Exp $

S=${WORKDIR}/${P}
IUSE="pam snmp ipv6"

DESCRIPTION="Multithreaded TCP/IP Routing Software that supports BGP-4, RIPv1, RIPv2 and OSPFv2"
SRC_URI="ftp://ftp.zebra.org/pub/zebra/${P}.tar.gz"
HOMEPAGE="http://www.zebra.org"
KEYWORDS="x86"
LICENSE="GPL-2"
SLOT="0"

DEPEND="virtual/glibc
	pam? ( >=pam-0.75-r11 )"

src_compile() {
	local myconf=""
	use pam || myconf="$myconf --disable-pam"
	use snmp || myconf="$myconf --disable-snmp"
	use ipv6 || myconf="$myconf --disable-ipv6"

	./configure \
		--host=${CHOST} \
		--prefix=/usr \
		--sysconfdir=/etc/zebra \
		--localstatedir=/var \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man \
		${myconf} || die "./configure failed"

	emake || die "Parallel Make Failed"
}

src_install() {
	make \
		prefix=${D}/usr \
		sysconfdir=${D}/etc/zebra \
		localstatedir=${D}/var \
		infodir=${D}/usr/share/info \
		mandir=${D}/usr/share/man \
		install || die "Installation Failed"

	cp */*.conf.sample ${D}/etc/zebra

	exeinto /etc/init.d ; newexe ${FILESDIR}/zebra.initd zebra
	insinto /etc/conf.d ; newins ${FILESDIR}/zebra.confd zebra

	dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO
}