/[gentoo-x86]/net-misc/zebra/zebra-0.93b-r1.ebuild
Gentoo

Contents of /net-misc/zebra/zebra-0.93b-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Wed Mar 30 17:33:07 2005 UTC (10 years, 5 months ago) by amir
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
removed zebra ebuild folder. zebra gets replaced by quagga. move has already been added to profiles/updates/1Q-2005.

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/zebra/zebra-0.93b-r1.ebuild,v 1.13 2005/02/21 02:42:40 dragonheart Exp $
4
5 inherit eutils
6
7 IUSE="pam snmp ipv6 ospfapi"
8
9 DESCRIPTION="Multithreaded TCP/IP Routing Software that supports BGP-4, RIPv1, RIPv2 and OSPFv2. Includes OSPFAPI"
10 SRC_URI="ftp://ftp.zebra.org/pub/zebra/${P}.tar.gz \
11 ospfapi? ( http://www.tik.ee.ethz.ch/~keller/ospfapi/src/ospfapi-release_0_93b-2003-01-25.tar.gz )"
12
13 HOMEPAGE="http://www.zebra.org"
14 # Homepage for ospfapi
15 HOMEPAGE="${HOMEPAGE} http://www.tik.ee.ethz.ch/~keller/ospfapi"
16 KEYWORDS="x86 ~sparc"
17 LICENSE="GPL-2"
18 SLOT="0"
19
20 DEPEND="virtual/libc
21 sys-devel/binutils
22 pam? ( >=sys-libs/pam-0.75-r11 )
23 snmp? ( net-analyzer/net-snmp )"
24
25 RDEPEND="virtual/libc sys-devel/binutils"
26
27 src_unpack() {
28 unpack ${A} || die
29 cd ${WORKDIR}
30 ln -s ${S} zebra
31
32 use ospfapi &&
33 epatch ospfapi-release_*-200[3-9]-[0-9][0-9]-[0-9][0-9].patch
34
35 ##################################
36 # This fix is for zebra-0.93b only
37 ##################################
38 cd ${S}/ospfd || die
39 epatch ${FILESDIR}/${P}/ospfd-assert-fix.patch
40 epatch ${FILESDIR}/${P}/ospfd-nbr-fix.patch
41 ##################################
42 }
43
44 src_compile() {
45 local myconf="--enable-vtysh --enable-tcp-zebra"
46
47 # use libpam for PAM support in vtysh
48 use pam && myconf="${myconf} --with-libpam" || myconf="${myconf} --disable-pam"
49 use snmp && myconf="${myconf} --enable-snmp" || myconf="${myconf} --disable-snmp"
50 use ipv6 && myconf="${myconf} --enable-ipv6" || myconf="${myconf} --disable-ipv6"
51
52 use ospfapi && myconf="${myconf} --enable-opaque-lsa --enable-ospf-te \
53 --enable-nssa"
54 use ospfapi && ./update-autotools
55
56 econf --prefix=/usr --sysconfdir=/etc/zebra ${myconf} || \
57 die "econf failed"
58 emake || die "emake failed"
59
60 if use ospfapi ; then
61 cd apiclient
62 econf --prefix=/usr --sysconfdir=/etc/zebra ${myconf} || \
63 die "econf failed in ospsapi-apiclient"
64 emake || die "emake failed in ospsapi-apiclient"
65 cd ..
66 fi
67 }
68
69 src_install() {
70 make \
71 prefix=${D}/usr \
72 sysconfdir=${D}/etc/zebra \
73 localstatedir=${D}/var \
74 infodir=${D}/usr/share/info \
75 mandir=${D}/usr/share/man \
76 install || die "zebra installation failed"
77
78 mkdir -p ${D}/etc/zebra/sample
79 # dodir ${D}/etc/ {D}/etc/zebra/ ${D}/etc/zebra/sample
80 cp */*.conf.sample* ${D}/etc/zebra/
81 mv ${D}/etc/zebra/*.conf.sample* ${D}/etc/zebra/sample
82
83 for proto in zebra bgpd ospfd ripd; do
84 insinto /etc/conf.d
85 newins ${FILESDIR}/conf.d/${proto}.confd ${proto}
86 exeinto /etc/init.d
87 newexe ${FILESDIR}/init.d/${proto}.initd ${proto}
88 done
89
90 # second loop for ipv6
91 use ipv6 && for proto in ospf6d ripngd; do
92 insinto /etc/conf.d
93 newins ${FILESDIR}/conf.d/${proto}.confd ${proto}
94 exeinto /etc/init.d
95 newexe ${FILESDIR}/init.d/${proto}.initd ${proto}
96 done
97
98 dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO
99 }
100
101 pkg_postinst() {
102 einfo "Sample configuration files can be found in /etc/zebra/sample"
103 einfo "You have to create config files in /etc/zebra before"
104 einfo "starting any one of the daemons."
105 }

  ViewVC Help
Powered by ViewVC 1.1.20