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

Contents of /net-misc/quagga/quagga-0.99.11-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Jun 23 21:12:04 2009 UTC (10 years, 2 months ago) by mrness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump (#275168). Add pcre USE flag.
(Portage version: 2.1.6.13/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.99.11-r1.ebuild,v 1.1 2009/05/02 09:37:52 mrness Exp $
4
5 EAPI="2"
6 WANT_AUTOMAKE="latest"
7 WANT_AUTOCONF="latest"
8
9 inherit eutils multilib autotools
10
11 DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP."
12 HOMEPAGE="http://quagga.net/"
13 SRC_URI="http://www.quagga.net/download/${P}.tar.gz
14 mirror://gentoo/${P}-patches-20090502.tar.gz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~s390 ~sparc ~x86"
19 IUSE="caps ipv6 snmp pam bgpclassless ospfapi realms multipath tcp-zebra"
20 RESTRICT="userpriv"
21
22 DEPEND="sys-libs/readline
23 caps? ( sys-libs/libcap )
24 snmp? ( net-analyzer/net-snmp )
25 pam? ( sys-libs/pam )"
26 RDEPEND="${DEPEND}
27 sys-apps/iproute2"
28
29 src_prepare() {
30 epatch "${WORKDIR}/patch/${P}-link-libcap.patch"
31 epatch "${WORKDIR}/patch/${P}-ipv6.patch"
32 epatch "${WORKDIR}/patch/${P}-ASN-fixes.patch"
33
34 # Classless prefixes for BGP - http://hasso.linux.ee/doku.php/english:network:quagga
35 use bgpclassless && epatch "${WORKDIR}/patch/ht-20040304-classless-bgp_adapted.patch"
36
37 # Realms support (Calin Velea) - http://vcalinus.gemenii.ro/quaggarealms.html
38 use realms && epatch "${WORKDIR}/patch/${P}-realms.diff"
39
40 eautoreconf
41 }
42
43 src_configure() {
44 local myconf="--disable-static \
45 $(use_enable caps capabilities) \
46 $(use_enable snmp) \
47 $(use_with pam libpam) \
48 $(use_enable tcp-zebra)"
49 use ipv6 \
50 && myconf="${myconf} --enable-ipv6 --enable-ripngd --enable-ospf6d --enable-rtadv" \
51 || myconf="${myconf} --disable-ipv6 --disable-ripngd --disable-ospf6d"
52 use ospfapi \
53 && myconf="${myconf} --enable-opaque-lsa --enable-ospf-te --enable-ospfclient"
54 use realms && myconf="${myconf} --enable-realms"
55 use multipath && myconf="${myconf} --enable-multipath=0"
56
57 econf \
58 --enable-user=quagga \
59 --enable-group=quagga \
60 --enable-vty-group=quagga \
61 --with-cflags="${CFLAGS}" \
62 --enable-vtysh \
63 --sysconfdir=/etc/quagga \
64 --enable-exampledir=/etc/quagga/samples \
65 --localstatedir=/var/run/quagga \
66 --libdir=/usr/$(get_libdir)/quagga \
67 ${myconf} \
68 || die "configure failed"
69 }
70
71 src_install() {
72 einstall \
73 localstatedir="${D}/var/run/quagga" \
74 sysconfdir="${D}/etc/quagga" \
75 exampledir="${D}/etc/quagga/samples" \
76 libdir="${D}/usr/$(get_libdir)/quagga" || die "make install failed"
77
78 dodir /var/run/quagga || die "failed to install /var/run/quagga"
79
80 local i MY_SERVICES_LIST="zebra ripd ospfd bgpd"
81 use ipv6 && MY_SERVICES_LIST="${MY_SERVICES_LIST} ripngd ospf6d"
82 for i in ${MY_SERVICES_LIST} ; do
83 newinitd "${FILESDIR}/${i}.init" ${i} || die "failed to install ${i} init.d script"
84 done
85 newconfd "${FILESDIR}/zebra.conf" zebra || die "failed to install zebra conf.d script"
86
87 if use pam; then
88 insinto /etc/pam.d
89 newins "${FILESDIR}/quagga.pam" quagga || die "failed to install pam.d file"
90 fi
91
92 newenvd "${FILESDIR}/quagga.env" 99quagga || die "failed to install env file"
93 }
94
95 pkg_preinst() {
96 enewgroup quagga
97 enewuser quagga -1 -1 /var/empty quagga
98 }
99
100 pkg_postinst() {
101 # empty dir for pid files for the new priv separation auth
102 #set proper owner/group/perms even if dir already existed
103 install -d -m0770 -o root -g quagga "${ROOT}/etc/quagga"
104 install -d -m0755 -o quagga -g quagga "${ROOT}/var/run/quagga"
105
106 einfo "Sample configuration files can be found in /etc/quagga/samples."
107 einfo "You have to create config files in /etc/quagga before"
108 einfo "starting one of the daemons."
109 }

  ViewVC Help
Powered by ViewVC 1.1.20