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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Fri Oct 14 05:19:12 2005 UTC (13 years, 11 months ago) by mrness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
remove 0.98.3; add warning about tcpmd5 kernel patch; x86 on 0.98.4
(Portage version: 2.0.51.22-r3)

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

  ViewVC Help
Powered by ViewVC 1.1.20