2003-09-27 23:40:56 +00:00
|
|
|
# New ports collection makefile for: quagga
|
|
|
|
# Date created: 3 September 2003
|
|
|
|
# Whom: Bruce M Simpson <bms@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= quagga
|
2003-11-05 15:19:55 +00:00
|
|
|
PORTVERSION= 0.96.4
|
2004-02-04 05:10:27 +00:00
|
|
|
PORTREVISION= 4
|
2003-09-27 23:40:56 +00:00
|
|
|
CATEGORIES= net ipv6
|
|
|
|
MASTER_SITES= http://quagga.net/download/
|
|
|
|
|
2003-11-05 16:02:03 +00:00
|
|
|
PATCH_SITES= http://quagga.net/
|
|
|
|
PATCHFILES= quagga-bgp_route-wspace.diff
|
|
|
|
|
2003-11-05 15:22:31 +00:00
|
|
|
MAINTAINER= boris@tagnet.ru
|
2003-09-27 23:40:56 +00:00
|
|
|
COMMENT= Free RIPv1, RIPv2, OSPFv2, BGP4 route software (server/reflector)
|
|
|
|
|
2003-09-29 13:34:04 +00:00
|
|
|
CONFLICTS= zebra-devel-* zebra-0*
|
2003-09-27 23:40:56 +00:00
|
|
|
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
USE_GMAKE= yes
|
2003-11-05 15:19:55 +00:00
|
|
|
USE_SUBMAKE= yes
|
2004-03-12 02:48:25 +00:00
|
|
|
USE_AUTOCONF_VER= 253
|
|
|
|
USE_AUTOMAKE_VER= 15
|
2003-11-05 15:19:55 +00:00
|
|
|
AUTOMAKE_ARGS= -a -i
|
2003-09-27 23:40:56 +00:00
|
|
|
|
|
|
|
MAN1= vtysh.1
|
|
|
|
MAN8= bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8
|
|
|
|
|
2003-11-09 10:59:28 +00:00
|
|
|
CONFIGURE_ARGS+=--includedir=${PREFIX}/include/quagga
|
2003-11-21 11:02:22 +00:00
|
|
|
SCRIPTS_ENV= WRKDIRPREFIX=${WRKDIRPREFIX} WITH_SNMP_4=${WITH_SNMP_4} \
|
|
|
|
SYSCONF_DIR=${SYSCONF_DIR} SYSSTATE_DIR=${SYSSTATE_DIR} \
|
|
|
|
ENABLE_USER=${ENABLE_USER} ENABLE_GROUP=${ENABLE_GROUP}
|
2003-09-27 23:40:56 +00:00
|
|
|
|
2003-11-05 15:19:55 +00:00
|
|
|
pre-fetch:
|
|
|
|
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.quagga
|
|
|
|
|
2003-09-27 23:40:56 +00:00
|
|
|
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
|
|
|
|
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
|
|
|
|
.endif
|
|
|
|
|
2003-11-14 16:18:17 +00:00
|
|
|
.if ${CONFIGURE_ARGS:M--enable-opaque-lsa} != ""
|
|
|
|
PLIST_SUB+= OSPFAPI_HEADER="include/quagga/ospfapi/ospf_apiclient.h"
|
|
|
|
PLIST_SUB+= OSPFAPI_PATH="@dirrm include/quagga/ospfapi"
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= OSPFAPI_HEADER=
|
|
|
|
PLIST_SUB+= OSPFAPI_PATH=
|
|
|
|
.endif
|
|
|
|
|
2003-11-05 15:19:55 +00:00
|
|
|
.if !defined(ENABLE_USER)
|
|
|
|
ENABLE_USER=quagga
|
|
|
|
.endif
|
|
|
|
.if !defined(ENABLE_GROUP)
|
|
|
|
ENABLE_GROUP=quagga
|
2003-09-27 23:40:56 +00:00
|
|
|
.endif
|
2003-11-05 15:19:55 +00:00
|
|
|
|
|
|
|
CONFIGURE_ARGS+=--enable-user=${ENABLE_USER}
|
2003-09-27 23:40:56 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-group=${ENABLE_GROUP}
|
2003-11-05 15:19:55 +00:00
|
|
|
|
|
|
|
.if !defined(SYSCONF_DIR)
|
|
|
|
SYSCONF_DIR=${PREFIX}/etc/quagga
|
2003-09-27 23:40:56 +00:00
|
|
|
.endif
|
2003-11-05 15:19:55 +00:00
|
|
|
.if !defined(LOCALSTATE_DIR)
|
|
|
|
LOCALSTATE_DIR=/var/run/quagga
|
|
|
|
.endif
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+=--sysconfdir=${SYSCONF_DIR}
|
|
|
|
CONFIGURE_ARGS+=--localstatedir=${LOCALSTATE_DIR}
|
|
|
|
|
2003-09-27 23:40:56 +00:00
|
|
|
.if defined(ENABLE_VTY_GROUP)
|
|
|
|
CONFIGURE_ARGS+=--enable-vty-group=${ENABLE_VTY_GROUP}
|
|
|
|
.endif
|
|
|
|
|
2003-11-05 15:19:55 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-vtysh
|
|
|
|
|
2003-11-21 11:02:22 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${OSVERSION} >= 500038
|
|
|
|
RC_SUBR?= ${DESTDIR}/etc/rc.subr
|
|
|
|
RC_DIR= ${DESTDIR}/etc/rc.d
|
|
|
|
RC_SUFX=
|
|
|
|
.else
|
|
|
|
USE_RC_SUBR= yes
|
|
|
|
RC_DIR= ${PREFIX}/etc/rc.d
|
|
|
|
RC_SUFX= .sh
|
|
|
|
.endif
|
|
|
|
|
|
|
|
QUAGGA_SCRIPTS= zebra ripd ripngd ospfd ospf6d bgpd
|
|
|
|
|
|
|
|
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
|
|
|
|
-e 's,%%SYSCONF_DIR%%,${SYSCONF_DIR},g' \
|
|
|
|
-e 's,%%LOCALSTATE_DIR%%,${LOCALSTATE_DIR},g' \
|
|
|
|
-e 's,%%RC_SUBR%%,${RC_SUBR},g' \
|
|
|
|
-e 's,%%RC_DIR%%,${RC_DIR},g' \
|
|
|
|
-e 's,%%RC_SUFX%%,${RC_SUFX},g'
|
|
|
|
|
|
|
|
PLIST_SUB+= RC_DIR=${RC_DIR} \
|
|
|
|
RC_SUFX=${RC_SUFX} \
|
|
|
|
LOCALSTATE_DIR=${LOCALSTATE_DIR} \
|
|
|
|
ENABLE_USER=${ENABLE_USER} \
|
|
|
|
ENABLE_GROUP=${ENABLE_GROUP}
|
|
|
|
|
2003-09-27 23:40:56 +00:00
|
|
|
pre-everything::
|
|
|
|
@${ECHO} "============================================================="
|
|
|
|
@${ECHO}
|
|
|
|
@${ECHO} "You can build ${PORTNAME} with the following options:"
|
|
|
|
@${ECHO}
|
2003-11-14 21:39:55 +00:00
|
|
|
@${ECHO} "WITH_SNMP_4 Force net-snmp 4.x to be used"
|
2003-09-27 23:40:56 +00:00
|
|
|
@${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"
|
2003-11-05 15:19:55 +00:00
|
|
|
@${ECHO} "SYSCONF_DIR Specify directory for Quagga configuration files"
|
|
|
|
@${ECHO} "LOCALSTATE_DIR Specify directory for Quagga runtime files"
|
2003-09-27 23:40:56 +00:00
|
|
|
@${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"
|
|
|
|
|
|
|
|
pre-configure:
|
|
|
|
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${ACLOCAL} )
|
|
|
|
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOHEADER_ENV} ${AUTOHEADER} \
|
|
|
|
${AUTOHEADER_ARGS})
|
2003-11-05 15:19:55 +00:00
|
|
|
-@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${AUTOMAKE} \
|
2003-09-27 23:40:56 +00:00
|
|
|
${AUTOMAKE_ARGS})
|
|
|
|
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOCONF_ENV} ${AUTOCONF} \
|
|
|
|
${AUTOCONF_ARGS})
|
|
|
|
|
2003-11-21 11:02:22 +00:00
|
|
|
post-build:
|
|
|
|
@${SED} ${SED_SCRIPT} ${FILESDIR}/quagga.sh > ${WRKDIR}/quagga.sh
|
|
|
|
|
2003-09-27 23:40:56 +00:00
|
|
|
post-install:
|
2003-11-21 11:02:22 +00:00
|
|
|
@${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
2003-09-27 23:40:56 +00:00
|
|
|
@${ECHO} "===> installing ${PORTNAME} startup file..."
|
2003-11-21 11:02:22 +00:00
|
|
|
@${ECHO} "Add the folliwing lines to /etc/rc.conf to enable quagga:"
|
|
|
|
@${ECHO} ""
|
2003-09-27 23:40:56 +00:00
|
|
|
@${ECHO} "defaultrouter=\"NO\""
|
2003-11-21 11:02:22 +00:00
|
|
|
@${ECHO} "quagga_enable=\"YES\""
|
|
|
|
@${ECHO} "Also You may want to set router_enable=\"NO\""
|
|
|
|
@${ECHO} ""
|
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/quagga.sh ${RC_DIR}/quagga${RC_SUFX}
|
2003-09-27 23:40:56 +00:00
|
|
|
|
|
|
|
.if !defined(BATCH)
|
|
|
|
post-clean:
|
|
|
|
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
|
|
|
|
.endif
|
|
|
|
|
2003-11-21 11:02:22 +00:00
|
|
|
.include <bsd.port.post.mk>
|