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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (hide annotations) (download)
Wed May 17 08:09:53 2006 UTC (13 years, 5 months ago) by mrness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
Remove obsolete version. Restrict userpriv (#133550).
(Portage version: 2203-svn)

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

  ViewVC Help
Powered by ViewVC 1.1.20