summaryrefslogtreecommitdiff
path: root/net/quagga
diff options
context:
space:
mode:
authorBruce M Simpson <bms@FreeBSD.org>2003-09-27 23:40:56 +0000
committerBruce M Simpson <bms@FreeBSD.org>2003-09-27 23:40:56 +0000
commitcbb181edcd3d0f77f9d679776e09b5a1ee665e67 (patch)
tree16c63c14912bb705efc5c5e47ce942b495131890 /net/quagga
parentUnbreak automated builds (a la bento), by removing explicit references (diff)
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
Notes
Notes: svn path=/head/; revision=89590
Diffstat (limited to 'net/quagga')
-rw-r--r--net/quagga/Makefile96
-rw-r--r--net/quagga/distinfo1
-rw-r--r--net/quagga/files/patch-configure.ac20
-rw-r--r--net/quagga/files/zebractl.sh57
-rw-r--r--net/quagga/pkg-descr13
-rw-r--r--net/quagga/pkg-plist36
-rw-r--r--net/quagga/scripts/configure85
7 files changed, 308 insertions, 0 deletions
diff --git a/net/quagga/Makefile b/net/quagga/Makefile
new file mode 100644
index 000000000000..06ad536dae72
--- /dev/null
+++ b/net/quagga/Makefile
@@ -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>
diff --git a/net/quagga/distinfo b/net/quagga/distinfo
new file mode 100644
index 000000000000..87c4b03d7ed7
--- /dev/null
+++ b/net/quagga/distinfo
@@ -0,0 +1 @@
+MD5 (quagga-0.96.2.tar.gz) = d32a24cd366199b8c4599a46ca46204b
diff --git a/net/quagga/files/patch-configure.ac b/net/quagga/files/patch-configure.ac
new file mode 100644
index 000000000000..aca88e392c0f
--- /dev/null
+++ b/net/quagga/files/patch-configure.ac
@@ -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"
diff --git a/net/quagga/files/zebractl.sh b/net/quagga/files/zebractl.sh
new file mode 100644
index 000000000000..ecb0a5976fac
--- /dev/null
+++ b/net/quagga/files/zebractl.sh
@@ -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
diff --git a/net/quagga/pkg-descr b/net/quagga/pkg-descr
new file mode 100644
index 000000000000..6ef55de47d0b
--- /dev/null
+++ b/net/quagga/pkg-descr
@@ -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
diff --git a/net/quagga/pkg-plist b/net/quagga/pkg-plist
new file mode 100644
index 000000000000..e75c935fe98b
--- /dev/null
+++ b/net/quagga/pkg-plist
@@ -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
diff --git a/net/quagga/scripts/configure b/net/quagga/scripts/configure
new file mode 100644
index 000000000000..879eeaa02c64
--- /dev/null
+++ b/net/quagga/scripts/configure
@@ -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