1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-22 20:41:26 +00:00

Quagga is a new fork of the GNU Zebra software router. This version, 0.96.2,

fixes many bugs in Zebra and adds several new features including support
for OSPFAPI, allowing developers to build powerful applications on top
of the OSPF routing protocol.

Submitted by:	fuzzball@ipv6peer.net
This commit is contained in:
Bruce M Simpson 2003-09-27 23:40:56 +00:00
parent f3779d049f
commit cbb181edcd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=89590
8 changed files with 309 additions and 0 deletions

View File

@ -543,6 +543,7 @@
SUBDIR += pygopherd
SUBDIR += pyslsk
SUBDIR += qadsl
SUBDIR += quagga
SUBDIR += queso
SUBDIR += radiator
SUBDIR += radiusclient

96
net/quagga/Makefile Normal file
View File

@ -0,0 +1,96 @@
# New ports collection makefile for: quagga
# Date created: 3 September 2003
# Whom: Bruce M Simpson <bms@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= quagga
PORTVERSION= 0.96.2
PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= http://quagga.net/download/
MAINTAINER= fuzzball@ipv6peer.net
COMMENT= Free RIPv1, RIPv2, OSPFv2, BGP4 route software (server/reflector)
CONFLICTS= zebra-devel-* zebra-pj-* zebra-0*
GNU_CONFIGURE= yes
USE_GMAKE= yes
WANT_AUTOCONF_VER= 253
WANT_AUTOMAKE_VER= 15
AUTOMAKE_ARGS= -a
MAN1= vtysh.1
MAN8= bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8
CONFIGURE_ARGS+=--sysconfdir=${PREFIX}/etc/quagga --enable-vtysh
SCRIPTS_ENV= WRKDIRPREFIX=${WRKDIRPREFIX}
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
.endif
.if defined(ENABLE_USER)
CONFIGURE_ARGS+=--enable-user=${ENABLE_USER}
.endif
.if defined(ENABLE_GROUP)
CONFIGURE_ARGS+=--enable-group=${ENABLE_GROUP}
.endif
.if defined(ENABLE_VTY_GROUP)
CONFIGURE_ARGS+=--enable-vty-group=${ENABLE_VTY_GROUP}
.endif
pre-everything::
@${ECHO} "============================================================="
@${ECHO}
@${ECHO} "You can build ${PORTNAME} with the following options:"
@${ECHO}
@${ECHO} "ENABLE_USER Specify user to run Quagga suite as"
@${ECHO} "ENABLE_GROUP Specify group to run Quagga suite as"
@${ECHO} "ENABLE_VTY_GROUP Specify group for vty socket ownership"
@${ECHO}
@${ECHO} "The following options may be configured interactively:"
@${ECHO} "QUAGGA_OPTIONS Specify additional switches, including:"
@${ECHO} " LIBPAM PAM authentication for vtysh"
@${ECHO} " OSPF_NSSA NSSA support (RFC1587)"
@${ECHO} " OSPF_OPAQUE_LSA OSPF Opaque-LSA with OSPFAPI support (RFC2370)"
@${ECHO} " RTADV IPv6 Router Advertisements"
@${ECHO} " SNMP SNMP support"
@${ECHO} " TCPSOCKETS Use TCP/IP sockets for protocol daemons"
post-patch:
@( cd ${PATCH_WRKSRC} && ${MV} configure.ac configure.in )
pre-configure:
.if !defined(BATCH)
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
.endif
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${ACLOCAL} )
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOHEADER_ENV} ${AUTOHEADER} \
${AUTOHEADER_ARGS})
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${AUTOMAKE} \
${AUTOMAKE_ARGS})
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOCONF_ENV} ${AUTOCONF} \
${AUTOCONF_ARGS})
post-install:
@${ECHO} "===> installing ${PORTNAME} startup file..."
@${SED} -e "s=!!PREFIX!!=${PREFIX}=" \
< ${FILESDIR}/zebractl.sh \
> ${PREFIX}/sbin/zebractl
@${CHMOD} 555 ${PREFIX}/sbin/zebractl
@${ECHO} "Make these entries in /etc/rc.conf to start ${PORTNAME}:"
@${ECHO} "defaultrouter=\"NO\""
@${ECHO} "router_enable=\"YES\""
@${ECHO} "router=\"${PREFIX}/sbin/zebractl\""
@${ECHO} "router_flags=\"start\""
@${ECHO} "done."
.if !defined(BATCH)
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
.endif
.include <bsd.port.mk>

1
net/quagga/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (quagga-0.96.2.tar.gz) = d32a24cd366199b8c4599a46ca46204b

View File

@ -0,0 +1,20 @@
--- configure.ac.orig Thu Sep 25 21:27:36 2003
+++ configure.ac Thu Sep 25 21:31:17 2003
@@ -755,6 +755,17 @@
LIBS="${LIBS} -lsnmp"
fi
;;
+ /usr/local/include/net-snmp/*)
+ AC_DEFINE(HAVE_SNMP,,SNMP)
+ AC_DEFINE(HAVE_NET_SNMP,,SNMP)
+ AC_DEFINE(UCD_COMPATIBLE,,SNMP)
+ CFLAGS="${CFLAGS} -I/usr/local/include -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/library"
+ if test"{HAVE_NETSNMP}" = "yes"; then
+ LIBS="${LIBS} -L/usr/local/lib -lnetsnmp"
+ else
+ LIBS="${LIBS} -L/usr/local/lib -lsnmp"
+ fi
+ ;;
/usr/include/ucd-snmp/*)
AC_DEFINE(HAVE_SNMP,,SNMP)
CFLAGS="${CFLAGS} -I/usr/include/ucd-snmp"

View File

@ -0,0 +1,57 @@
#! /bin/sh
#
# $FreeBSD: /tmp/pcvs/ports/net/quagga/files/Attic/zebractl.sh,v 1.1 2003-09-27 23:40:56 bms Exp $
#
# zebra start/stop script by "Andreas Klemm <andreas@FreeBSD.ORG>"
#
usage()
{
echo "$0: usage: $0 [ start | stop | restart ]"
exit 1
}
if [ $# -lt 1 ]; then
echo "$0: error: one argument needed"; usage
elif [ $# -gt 1 ]; then
echo "$0: error: only one argument needed"; usage
fi
case $1 in
start)
if [ ! -f !!PREFIX!!/etc/zebra/zebra.conf ]; then
echo "error: zebra.conf config file is mandatory"
exit 1
fi
[ -f !!PREFIX!!/etc/zebra/zebra.conf ] \
&& !!PREFIX!!/sbin/zebra -d && echo -n ' zebra'
[ -f !!PREFIX!!/etc/zebra/ripd.conf ] \
&& !!PREFIX!!/sbin/ripd -d && echo -n ' ripd'
[ -f !!PREFIX!!/etc/zebra/ripngd.conf ] \
&& !!PREFIX!!/sbin/ripngd -d && echo -n ' ripngd'
[ -f !!PREFIX!!/etc/zebra/ospfd.conf ] \
&& !!PREFIX!!/sbin/ospfd -d && echo -n ' ospfd'
[ -f !!PREFIX!!/etc/zebra/ospf6d.conf ] \
&& !!PREFIX!!/sbin/ospf6d -d && echo -n ' ospf6d'
[ -f !!PREFIX!!/etc/zebra/bgpd.conf ] \
&& !!PREFIX!!/sbin/bgpd -d && echo -n ' bgpd'
;;
stop)
[ -f !!PREFIX!!/etc/zebra/ripd.conf ] && killall ripd
[ -f !!PREFIX!!/etc/zebra/ripngd.conf ] && killall ripngd
[ -f !!PREFIX!!/etc/zebra/ospfd.conf ] && killall ospfd
[ -f !!PREFIX!!/etc/zebra/ospf6d.conf ] && killall ospf6d
[ -f !!PREFIX!!/etc/zebra/bgpd.conf ] && killall bgpd
[ -f !!PREFIX!!/etc/zebra/zebra.conf ] && killall zebra
;;
restart)
$0 stop
$0 start
;;
*) echo "$0: error: unknown option $1"
usage
;;
esac
exit 0

13
net/quagga/pkg-descr Normal file
View File

@ -0,0 +1,13 @@
From the website:
Quagga is a routing software suite, providing implementations of
OSPFv2, OSPFv3, RIP v1 and v2, RIPv3 and BGPv4 for Unix platforms,
particularly FreeBSD and Linux and also NetBSD, to mention a few.
Quagga is a fork of GNU Zebra which was developed by Kunihiro
Ishiguro. The Quagga tree aims to build a more involved community
around Quagga than the current centralised model of GNU Zebra.
WWW: http://quagga.net/
Bruce
bms@freebsd.org

36
net/quagga/pkg-plist Normal file
View File

@ -0,0 +1,36 @@
sbin/bgpd
sbin/ospf6d
sbin/ospfd
sbin/ripd
sbin/ripngd
sbin/zebra
sbin/zebractl
bin/vtysh
etc/quagga/bgpd.conf.sample
etc/quagga/bgpd.conf.sample2
etc/quagga/ospf6d.conf.sample
etc/quagga/ospfd.conf.sample
etc/quagga/ripd.conf.sample
etc/quagga/ripngd.conf.sample
etc/quagga/vtysh.conf.sample
etc/quagga/zebra.conf.sample
include/ospfd/ospf_api.h
include/ospfd/ospf_asbr.h
include/ospfd/ospf_dump.h
include/ospfd/ospf_ism.h
include/ospfd/ospf_lsa.h
include/ospfd/ospf_lsdb.h
include/ospfd/ospf_nsm.h
include/ospfd/ospf_opaque.h
include/ospfd/ospfd.h
lib/libospf.a
lib/libzebra.a
@unexec install-info --delete %D/info/quagga.info %D/info/dir
info/quagga.info
info/quagga.info-1
info/quagga.info-2
info/quagga.info-3
info/quagga.info-4
@exec install-info %D/info/quagga.info %D/info/dir
@dirrm include/ospfd
@dirrm etc/quagga

85
net/quagga/scripts/configure vendored Normal file
View File

@ -0,0 +1,85 @@
#!/bin/sh
#
# configure - quagga compile time option configurator
# by Bruce M Simpson <bms@FreeBSD.org>
#
# $FreeBSD$
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
exit
fi
tempfile=`mktemp -t checklist`
if [ "${QUAGGA_OPTIONS}" ]; then
set ${QUAGGA_OPTIONS}
fi
for i; do
eval status_$i=ON
done
if [ -z "${BATCH}" ]; then
/usr/bin/dialog --title "Quagga configuration options" --clear \
--checklist "\n\
Please select desired options:" -1 -1 8 \
LIBPAM "PAM authentication for vtysh" "$status_LIBPAM" \
OSPF_NSSA "NSSA support (RFC1587)" "$status_OSPF_NSSA" \
OSPF_OPAQUE_LSA "OSPF Opaque-LSA with OSPFAPI support (RFC2370)" "$status_OSPF_OPAQUE_LSA" \
RTADV "IPv6 Router Advertisements" "$status_RTADV" \
SNMP "SNMP support" "$status_SNMP" \
TCPSOCKETS "Use TCP/IP sockets for protocol daemons" "$status_TCPSOCKETS" \
2> $tempfile
retval=$?
if [ -s $tempfile ]; then
set `sed 's/"//g' $tempfile`
fi
rm -f $tempfile
case $retval in
0) if [ -z "$*" ]; then
echo "Nothing selected"
fi
;;
1) echo "Cancel pressed."
exit 1
;;
esac
fi
/bin/mkdir -p ${WRKDIRPREFIX}${CURDIR}
exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
echo "PREFIX= ${PREFIX}"
while [ "$1" ]; do
case $1 in
LIBPAM)
echo 'CONFIGURE_ARGS+= --with-libpam'
;;
OSPF_NSSA)
echo 'CONFIGURE_ARGS+= --enable-nssa'
;;
OSPF_OPAQUE_LSA)
echo 'CONFIGURE_ARGS+= --enable-opaque-lsa'
;;
RTADV)
echo 'CONFIGURE_ARGS+= --enable-rtadv'
;;
SNMP)
echo 'LIB_DEPENDS+= snmp.4:${PORTSDIR}/net/net-snmp:install'
echo 'CONFIGURE_ARGS+= --enable-snmp'
;;
TCPSOCKETS)
echo 'CONFIGURE_ARGS+= --enable-tcp-zebra'
;;
*)
echo "Unknown option(s): $*" > /dev/stderr
rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
exit 1
;;
esac
shift
done