/[gentoo-x86]/net-misc/quagga/quagga-0.98.5-r2.ebuild
Gentoo

Contents of /net-misc/quagga/quagga-0.98.5-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed May 10 07:19:26 2006 UTC (13 years, 4 months ago) by mrness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Remove old test revision. Version bump wrt security bug #132353.
(Portage version: 2203-svn)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/quagga-0.98.5-r2.ebuild,v 1.1 2005/12/13 14:37:07 amir Exp $
4
5 inherit eutils multilib
6
7 DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP. Includes OSPFAPI, NET-SNMP and IPV6 support."
8 HOMEPAGE="http://quagga.net/"
9 SRC_URI="http://www.quagga.net/download/${P}.tar.gz
10 mirror://gentoo/${P}-patches-20051105.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~ppc ~sparc ~x86"
15 IUSE="ipv6 snmp pam tcpmd5 bgpclassless ospfapi realms fix-connected-rt multipath tcp-zebra"
16
17 RDEPEND="sys-apps/iproute2
18 >=sys-libs/libcap-1.10-r5
19 snmp? ( net-analyzer/net-snmp )
20 pam? ( sys-libs/pam )"
21 DEPEND="${RDEPEND}
22 virtual/libc
23 sys-devel/binutils
24 sys-devel/autoconf-wrapper
25 sys-devel/libtool"
26
27 src_unpack() {
28 unpack ${A} || die "failed to unpack sources"
29
30 cd ${S} || die "source dir not found"
31
32 # TCP MD5 for BGP patch for Linux (RFC 2385) - http://hasso.linux.ee/quagga/ht-20050110-0.98.0-bgp-md5.patch
33 use tcpmd5 && epatch "${WORKDIR}/patch/ht-20050110-0.98.0-bgp-md5.patch"
34
35 # Classless prefixes for BGP - http://hasso.linux.ee/quagga/pending-patches/ht-20040304-classless-bgp.patch
36 use bgpclassless && epatch "${WORKDIR}/patch/ht-20040304-classless-bgp.patch"
37
38 # Connected route fix (Amir Guindehi) - http://voidptr.sboost.org/quagga/amir-connected-route.patch.bz2
39 # Dependant on the use flag 'fix-connected-rt' because it seems that more peoples have troubles
40 # with this than having a benefit.
41 # This patch fixes a bad behavior of the Linux kernel routing packets to interfaces which are
42 # down. Folks with PtP interfaces and VLans report troubles with this patch. Enable it again
43 # if you get a problem because your kernel routes packets to a downed interface.
44 use fix-connected-rt && epatch "${WORKDIR}/patch/amir-connected-route.patch"
45
46 # Realms support (Calin Velea) - http://vcalinus.gemenii.ro/quaggarealms.html
47 use realms && epatch "${WORKDIR}/patch/${P}-realms.diff"
48 }
49
50 src_compile() {
51 # regenerate configure and co if we touch .ac or .am files
52 #export WANT_AUTOMAKE=1.7
53 #./update-autotools || die
54 autoreconf
55 libtoolize --copy --force
56
57 local myconf="--disable-static --enable-dynamic"
58
59 use ipv6 \
60 && myconf="${myconf} --enable-ipv6 --enable-ripng --enable-ospf6d --enable-rtadv" \
61 || myconf="${myconf} --disable-ipv6 --disable-ripngd --disable-ospf6d"
62 use ospfapi \
63 && myconf="${myconf} --enable-opaque-lsa --enable-ospf-te --enable-ospfclient"
64 use snmp && myconf="${myconf} --enable-snmp"
65 use pam && myconf="${myconf} --with-libpam"
66 use tcpmd5 && myconf="${myconf} --enable-tcp-md5"
67 use realms && myconf="${myconf} --enable-realms"
68 use multipath && myconf="${myconf} --enable-multipath=0"
69 use tcp-zebra && myconf="${myconf} --enable-tcp-zebra"
70
71 econf \
72 --enable-nssa \
73 --enable-user=quagga \
74 --enable-group=quagga \
75 --enable-vty-group=quagga \
76 --with-cflags="${CFLAGS}" \
77 --enable-vtysh \
78 --sysconfdir=/etc/quagga \
79 --enable-exampledir=/etc/quagga/samples \
80 --localstatedir=/var/run/quagga \
81 --libdir=/usr/$(get_libdir)/quagga \
82 ${myconf} \
83 || die "configure failed"
84 emake || die "make failed"
85 }
86
87 src_install() {
88 einstall \
89 localstatedir=${D}/var/run/quagga \
90 sysconfdir=${D}/etc/quagga \
91 exampledir=${D}/etc/quagga/samples \
92 libdir=${D}/usr/$(get_libdir)/quagga || die "make install failed"
93
94 keepdir /var/run/quagga || die
95
96 local i MY_SERVICES_LIST="zebra ripd ospfd bgpd"
97 use ipv6 && MY_SERVICES_LIST="${MY_SERVICES_LIST} ripngd ospf6d"
98 for i in ${MY_SERVICES_LIST} ; do
99 newinitd ${FILESDIR}/${i}.init ${i} || die "failed to install ${i} init.d script"
100 done
101 newconfd ${FILESDIR}/zebra.conf zebra || die "failed to install zebra conf.d script"
102
103 if use pam; then
104 insinto /etc/pam.d
105 newins ${FILESDIR}/quagga.pam quagga
106 fi
107
108 newenvd ${FILESDIR}/quagga.env 99quagga
109 }
110
111 pkg_preinst() {
112 enewgroup quagga
113 enewuser quagga -1 -1 /var/empty quagga
114 }
115
116 pkg_postinst() {
117 # empty dir for pid files for the new priv separation auth
118 #set proper owner/group/perms even if dir already existed
119 install -d -m0770 -o root -g quagga ${ROOT}/etc/quagga
120 install -d -m0755 -o quagga -g quagga ${ROOT}/var/run/quagga
121
122 einfo "Sample configuration files can be found in /etc/quagga/samples."
123 einfo "You have to create config files in /etc/quagga before"
124 einfo "starting one of the daemons."
125
126 if use tcpmd5; then
127 echo
128 ewarn "TCP MD5 for BGP needs a patched kernel!"
129 einfo "See http://hasso.linux.ee/quagga/bgp-md5.en.php for more info."
130 fi
131
132 if use ipv6; then
133 echo
134 ewarn "This version of quagga contains a netlink race condition fix that triggered a kernel bug"
135 ewarn "which affects IPv6 users who have a kernel version < 2.6.13-rc6."
136 einfo "See following links for more info:"
137 einfo " http://lists.quagga.net/pipermail/quagga-dev/2005-June/003507.html"
138 einfo " http://bugzilla.quagga.net/show_bug.cgi?id=196"
139 fi
140 }

  ViewVC Help
Powered by ViewVC 1.1.20