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

Contents of /net-misc/quagga/quagga-0.99.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Wed Apr 25 22:24:06 2007 UTC (12 years, 5 months ago) by mrness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Add new TCP MD5 patch for kernels >= 2.6.20, thanks to Duncan Lockwood <dunc at lemonia dot org> (#175470).
(Portage version: 2.1.2.2)

1 mrness 1.1 # Copyright 1999-2007 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 mrness 1.2 # $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/quagga-0.99.6.ebuild,v 1.1 2007/01/12 14:04:43 mrness Exp $
4 mrness 1.1
5     WANT_AUTOMAKE="latest"
6     WANT_AUTOCONF="latest"
7    
8     inherit eutils multilib autotools
9    
10     DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP. Includes OSPFAPI, NET-SNMP and IPV6 support."
11     HOMEPAGE="http://quagga.net/"
12     SRC_URI="http://www.quagga.net/download/${P}.tar.gz
13     mirror://gentoo/${P}-patches-20070112.tar.gz"
14    
15     LICENSE="GPL-2"
16     SLOT="0"
17     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~s390 ~sparc ~x86"
18     IUSE="ipv6 snmp pam tcpmd5 bgpclassless ospfapi realms multipath tcp-zebra"
19     RESTRICT="userpriv"
20    
21     DEPEND=">=sys-libs/libcap-1.10-r5
22     snmp? ( net-analyzer/net-snmp )
23     pam? ( sys-libs/pam )"
24     RDEPEND="${DEPEND}
25     sys-apps/iproute2"
26    
27     src_unpack() {
28     unpack ${A} || die "failed to unpack sources"
29    
30     cd "${S}" || die "source dir not found"
31     epatch "${WORKDIR}/patch/${P}-link-libcap.patch"
32    
33     # TCP MD5 for BGP patch for Linux (RFC 2385) - http://hasso.linux.ee/doku.php/english:network:rfc2385
34     use tcpmd5 && epatch "${WORKDIR}/patch/ht-20050321-0.99.6-bgp-md5_adapted.patch"
35    
36     # Classless prefixes for BGP - http://hasso.linux.ee/doku.php/english:network:quagga
37     use bgpclassless && epatch "${WORKDIR}/patch/ht-20040304-classless-bgp_adapted.patch"
38    
39     # Realms support (Calin Velea) - http://vcalinus.gemenii.ro/quaggarealms.html
40     use realms && epatch "${WORKDIR}/patch/${P}-realms.diff"
41    
42     eautoreconf
43     }
44    
45     src_compile() {
46     local myconf="--disable-static --enable-dynamic"
47    
48     use ipv6 \
49     && myconf="${myconf} --enable-ipv6 --enable-ripng --enable-ospf6d --enable-rtadv" \
50     || myconf="${myconf} --disable-ipv6 --disable-ripngd --disable-ospf6d"
51     use ospfapi \
52     && myconf="${myconf} --enable-opaque-lsa --enable-ospf-te --enable-ospfclient"
53     use snmp && myconf="${myconf} --enable-snmp"
54     use pam && myconf="${myconf} --with-libpam"
55     use tcpmd5 && myconf="${myconf} --enable-tcp-md5"
56     use realms && myconf="${myconf} --enable-realms"
57     use multipath && myconf="${myconf} --enable-multipath=0"
58     use tcp-zebra && myconf="${myconf} --enable-tcp-zebra"
59    
60     econf \
61     --enable-nssa \
62     --enable-user=quagga \
63     --enable-group=quagga \
64     --enable-vty-group=quagga \
65     --with-cflags="${CFLAGS}" \
66     --enable-vtysh \
67     --sysconfdir=/etc/quagga \
68     --enable-exampledir=/etc/quagga/samples \
69     --localstatedir=/var/run/quagga \
70     --libdir=/usr/$(get_libdir)/quagga \
71     ${myconf} \
72     || die "configure failed"
73     emake || die "make failed"
74     }
75    
76     src_install() {
77     einstall \
78     localstatedir="${D}/var/run/quagga" \
79     sysconfdir="${D}/etc/quagga" \
80     exampledir="${D}/etc/quagga/samples" \
81     libdir="${D}/usr/$(get_libdir)/quagga" || die "make install failed"
82    
83     keepdir /var/run/quagga
84    
85     local i MY_SERVICES_LIST="zebra ripd ospfd bgpd"
86     use ipv6 && MY_SERVICES_LIST="${MY_SERVICES_LIST} ripngd ospf6d"
87     for i in ${MY_SERVICES_LIST} ; do
88     newinitd "${FILESDIR}/${i}.init" ${i} || die "failed to install ${i} init.d script"
89     done
90     newconfd "${FILESDIR}/zebra.conf" zebra || die "failed to install zebra conf.d script"
91    
92     if use pam; then
93     insinto /etc/pam.d
94     newins "${FILESDIR}/quagga.pam" quagga
95     fi
96    
97     newenvd "${FILESDIR}/quagga.env" 99quagga
98     }
99    
100     pkg_preinst() {
101     enewgroup quagga
102     enewuser quagga -1 -1 /var/empty quagga
103     }
104    
105     pkg_postinst() {
106     # empty dir for pid files for the new priv separation auth
107     #set proper owner/group/perms even if dir already existed
108     install -d -m0770 -o root -g quagga "${ROOT}/etc/quagga"
109     install -d -m0755 -o quagga -g quagga "${ROOT}/var/run/quagga"
110    
111     einfo "Sample configuration files can be found in /etc/quagga/samples."
112     einfo "You have to create config files in /etc/quagga before"
113     einfo "starting one of the daemons."
114    
115     if use tcpmd5; then
116     echo
117     ewarn "TCP MD5 for BGP needs a patched kernel!"
118     ewarn "See http://hasso.linux.ee/doku.php/english:network:rfc2385 for more info."
119     fi
120     }

  ViewVC Help
Powered by ViewVC 1.1.20