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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20