aboutsummaryrefslogtreecommitdiffstats
path: root/net/zebra
diff options
context:
space:
mode:
Diffstat (limited to 'net/zebra')
-rw-r--r--net/zebra/Makefile47
-rw-r--r--net/zebra/scripts/configure62
2 files changed, 33 insertions, 76 deletions
diff --git a/net/zebra/Makefile b/net/zebra/Makefile
index 5fd54b4855e..1789d273e0c 100644
--- a/net/zebra/Makefile
+++ b/net/zebra/Makefile
@@ -16,23 +16,54 @@ MASTER_SITES= ftp://ftp.zebra.org/pub/zebra/ \
ftp://ftp.pop-pr.rnp.br/pub/GNU/ftp.zebra.org/zebra/
MAINTAINER= sumikawa@FreeBSD.org
-COMMENT= Free RIPv1, RIPv2, OSPFv2, BGP4 route software (server/reflector)
+COMMENT= Free RIPv1, RIPv2, OSPFv2, BGP4 route software (server/reflector)
USE_SUBMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/zebra
SCRIPTS_ENV= WRKDIRPREFIX=${WRKDIRPREFIX}
+OPTIONS= IPV6 "enable IPv6 support" on \
+ LIBPAM "enable PAM authentication for vtysh" off \
+ OSPFNSSA "turn on undergoing NSSA feature" off \
+ SNMP "enable SNMP support" off \
+ TCPZEBRA "enable TCP/IP socket connection" off \
+ BGPD "enable BGPD" on \
+ OSPF6D "enable OSPF6D" on \
+ OSPFD "enable OSPFD" on \
+ RIPD "enable RIPD" on \
+ RIPNGD "enable RIPNGD" on \
+ VTYSH "enable VTYSH" on
+
MAN1= vtysh.1
MAN8= bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8
INFO= zebra
+.include <bsd.port.pre.mk>
+
.if defined (WITHOUT_IPV6)
CONFIGURE_ARGS+=--disable-ipv6
WITHOUT_OSPF6D= yes
WITHOUT_RIPNGD= yes
.endif
+.if defined (WITH_LIBPAM)
+CONFIGURE_ARGS+=--with-libpam
+.endif
+
+.if defined (WITH_OSPFNSSA)
+CONFIGURE_ARGS+=--enable-nssa
+.endif
+
+.if defined (WITH_SNMP)
+CONFIGURE_ARGS+=--enable-snmp
+LIB_DEPENDS+=snmp.4:${PORTSDIR}/net-mgmt/net-snmp4:install
+.endif
+
+.if defined (WITH_TCPZEBRA)
+CONFIGURE_ARGS+=--enable-tcp-zebra
+.endif
+
.if !defined(WITHOUT_BGPD)
PLIST_SUB+= BGPD=""
.else
@@ -76,18 +107,6 @@ CONFIGURE_ARGS+=--enable-vtysh
PLIST_SUB+= VTYSH="@comment "
.endif
-.if !defined(BATCH)
-pre-configure:
- @${RM} -f ${WRKDIR}/Makefile.inc
-
-post-clean:
- @${RM} -f ${WRKDIR}/Makefile.inc
-
-.if exists(${WRKDIR}/Makefile.inc)
-.include "${WRKDIR}/Makefile.inc"
-.endif
-.endif
-
post-install:
@( cd ${WRKSRC}/doc; ${RM} -f zebra*info*; ${MAKE} zebra.info install )
@${ECHO} "===> installing zebra startup file..."
@@ -102,4 +121,4 @@ post-install:
@${ECHO} "router_flags=\"start\""
@${ECHO} "done."
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net/zebra/scripts/configure b/net/zebra/scripts/configure
deleted file mode 100644
index a48a5446feb..00000000000
--- a/net/zebra/scripts/configure
+++ /dev/null
@@ -1,62 +0,0 @@
-#! /bin/sh
-
-# $FreeBSD$
-
-# configure - zebra compile time option configurator
-# by Andreas Klemm <andreas@FreeBSD.org>
-
-if [ "$BATCH" != "yes" -a "$BATCH" != "YES" ]; then
-
-#
-# configure - zebra compile time options
-#
-
-/usr/bin/dialog --title "Zebra Compile Time Options" --clear \
- --checklist "\n\
-Select compile time options for zebra port:" -1 -1 8 \
-LIBPAM "enable PAM authentication for vtysh" OFF \
-OSPF_NSSA "turn on undergoing NSSA feature" OFF \
-SNMP "enable SNMP support" OFF \
-TCP-ZEBRA "enable TCP/IP socket connection" OFF \
-2> /tmp/zebra-checklist.$$
-
-retval=$?
-
-if [ -s /tmp/zebra-checklist.$$ ]; then
- set `cat /tmp/zebra-checklist.$$`
-fi
-rm -f /tmp/zebra-checklist.$$
-
-case $retval in
- 0) if [ -z "$*" ]; then
- echo "Nothing selected"
- fi
- ;;
- 1) echo "Cancel pressed."
- exit 1
- ;;
-esac
-
-/bin/mkdir -p ${WRKDIR}
-exec > ${WRKDIR}/Makefile.inc
-
-while [ "$1" ]; do
- case $1 in
- \"LIBPAM\")
- echo CONFIGURE_ARGS+=--with-libpam
- ;;
- \"OSPF_NSSA\")
- echo CONFIGURE_ARGS+=--enable-nssa
- ;;
- \"SNMP\")
- echo CONFIGURE_ARGS+=--enable-snmp
- echo 'LIB_DEPENDS+=snmp.4:${PORTSDIR}/net-mgmt/net-snmp4:install'
- ;;
- \"TCP-ZEBRA\")
- echo CONFIGURE_ARGS+=--enable-tcp-zebra
- ;;
- esac
- shift
-done
-
-fi # if $BATCH