1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

Add new port net/xorp-devel, for the current XORP line of development

in SourceForge SVN.
It now builds using SCons, and the Boost C++ libraries.

The package is now relocatable using the rtld $ORIGIN feature, and
should now conform to hier(7), and the Filesystem Hierarchy Standard.

Other improvements include: more mature shared library support, default
to using UNIX domain sockets for improved RPC performance, PIM-SM BSR,
various bug fixes and performance enhancements, size reductions.

With shared libraries, a full production router suite package of
xorp-devel now weighs in at ~22MB on-disk, on amd64.
This commit is contained in:
Bruce M Simpson 2009-12-08 10:53:10 +00:00
parent 2b134cd887
commit 5274b14529
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=245405
8 changed files with 472 additions and 0 deletions

View File

@ -1090,6 +1090,7 @@
SUBDIR += xmlrpc-c-devel
SUBDIR += xmlrpc-epi
SUBDIR += xorp
SUBDIR += xorp-devel
SUBDIR += xprobe
SUBDIR += xpvm
SUBDIR += xrdesktop

101
net/xorp-devel/Makefile Normal file
View File

@ -0,0 +1,101 @@
# New ports collection makefile for: xorp
# Date created: 22nd September 2006
# Whom: Bruce M Simpson <bms@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= xorp-devel
PORTVERSION= 2009120801
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= bms
DISTNAME= xorp-${PORTVERSION}
MAINTAINER= bms@FreeBSD.org
COMMENT= Open source network routing platform, development branch
# Uses libcurses, libcrypto, librt from base system.
BUILD_DEPENDS= ${LOCALBASE}/include/boost/version.hpp:${PORTSDIR}/devel/boost-libs
LIB_DEPENDS= boost_regex.4:${PORTSDIR}/devel/boost-libs \
pcap.3:${PORTSDIR}/net/libpcap
CONFLICTS= xorp-1*
NOMAN= defined
USE_BZIP2= yes
USE_GCC= 4.2+
USE_SCONS= yes
#USE_OPENSSL= yes
MAKE_JOBS_SAFE= defined
OPTIONS= \
OPTIMIZE "Build with optimization" On \
ORIGIN "Use ORIGIN with shared libraries" On \
SHARED "Build with shared libraries" On \
STRIP "Strip binaries before installing" On \
TCP_RPC "Use TCP as RPC transport (defaults to AF_LOCAL)" Off
#
# To roll snapshot: as bms: make BOOTSTRAP=defined fetch
#
.if defined(BOOTSTRAP)
FETCH_DEPENDS+= svn:${PORTSDIR}/devel/subversion
SVN_REV= 11685 # svn tip at epoch 2009120801
SVNROOT_URI= http://xorp.svn.sourceforge.net/svnroot/xorp
do-fetch:
${MKDIR} ${WRKDIR}
svn export -r ${SVN_REV} ${SVNROOT_URI}/trunk/xorp ${WRKSRC}
cd ${WRKDIR}; tar cvfy ${DISTDIR}/${DISTNAME}.tar.bz2 ${DISTNAME}
.if ${USER} == bms
${CHMOD} ugo+r ${DISTDIR}/${DISTNAME}.tar.bz2
scp -p ${DISTDIR}/${DISTNAME}.tar.bz2 \
freefall.freebsd.org:public_distfiles/
.endif
.endif # defined(BOOTSTRAP)
.include <bsd.port.pre.mk>
XORP_GROUP= xorp
USE_RC_SUBR= xorp
SCONS_ARGS+= prefix=${PREFIX}
.if defined(WITHOUT_OPTIMIZE)
SCONS_ARGS+= optimize=no
.else
SCONS_ARGS+= optimize=yes
.endif
.if defined(WITHOUT_SHARED)
SCONS_ARGS+= shared=false
PLIST_SUB+= XORP_SHLIB="@comment "
.else
SCONS_ARGS+= shared=true
PLIST_SUB+= XORP_SHLIB=""
USE_LDCONFIG= ${PREFIX}/lib/xorp/lib
. if defined (WITHOUT_ORIGIN)
SCONS_ARGS+= origin=false
. else
SCONS_ARGS+= origin=true
. endif
.endif
.if defined(WITHOUT_STRIP)
SCONS_ARGS+= strip=false
.else
SCONS_ARGS+= strip=true
.endif
.if defined(WITH_TCP_RPC)
SCONS_ARGS+= transport=tcp
.else
SCONS_ARGS+= transport=local
.endif
post-install:
${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>

3
net/xorp-devel/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (xorp-2009120801.tar.bz2) = b82d481bedb16ce836fcf33ba6ab0cf2
SHA256 (xorp-2009120801.tar.bz2) = 057a3c12c9b0323b0bc0a6f9d8635d74f096d91e5be7e3dd2f2ab2c836205c20
SIZE (xorp-2009120801.tar.bz2) = 2917658

View File

@ -0,0 +1,108 @@
#!/bin/sh
#
# $FreeBSD$
#
# A sample XORP startup script.
#
# PROVIDE: xorp
# REQUIRE: netif routing mountcritlocal
# BEFORE: NETWORKING
# Add the following lines to /etc/rc.conf to enable xorp:
#
#xorp_enable="YES"
#xorp_conf="%%PREFIX%%/etc/xorp.conf.sample"
#
. %%RC_SUBR%%
name="xorp"
rcvar=`set_rcvar`
load_rc_config $name
: ${xorp_enable="NO"}
: ${xorp_conf="%%PREFIX%%/etc/xorp.conf"}
: ${xorp_flags=""}
: ${xorp_rtrmgr_pidfile="/var/run/xorp_rtrmgr.pid"}
: ${xorp_rtrmgr_logfile="/var/log/xorp_rtrmgr.log"}
: ${xorp_rtrmgr_poll_enable=true}
: ${xorp_rtrmgr_poll_timeout=90}
: ${xorp_hardkill_enable=false}
required_files=${xorp_conf}
command=%%PREFIX%%/sbin/xorp_rtrmgr
command_args="-c ${xorp_conf}"
pidfile=${xorp_rtrmgr_pidfile}
sig_stop=INT
start_precmd="xorp_prestart"
start_cmd="xorp_start"
stop_postcmd="xorp_poststop"
xorp_prestart()
{
touch ${xorp_rtrmgr_logfile}
return 0
}
# FIXME use XORP's built-in syslog capability
xorp_start()
{
pidfile=${xorp_rtrmgr_pidfile}
echo -n 'Starting XORP router processes:'
# FIXME use XORP's built-in daemonization
echo -n ' xorp_rtrmgr'
if ! daemon </dev/null >>${xorp_rtrmgr_logfile} 2>&1 -c -p ${pidfile} \
${command} ${command_args} ; then
warn 'could not bring up xorp_rtrmgr.'
return 1
fi
${xorp_rtrmgr_poll_enable} || return 0
# If startup polling is enabled, then poll xorp_rtrmgr every
# second to see if it died, or if it logged successful bringup.
# XXX This may be racy on very fast machines, but without
# daemonizing support from xorp_rtrmgr it's difficult not to race.
pid=$(cat ${xorp_rtrmgr_pidfile})
timeout=${xorp_rtrmgr_poll_timeout}
tick=0
fail=true
until [ $tick = $timeout ];
do
sleep 1 ; kill -0 ${pid} || break
if ( tail -5 ${xorp_rtrmgr_logfile} | \
grep 'No more tasks to run' > /dev/null 2>&1 ) ; then
fail=false
break
fi
tick=$((tick + 1))
done
if $fail ; then
warn 'xorp_rtrmgr failed to start'
return 1
fi
echo '.'
return 0
}
xorp_poststop()
{
rm -f ${xorp_rtrmgr_pidfile} >/dev/null 2>&1 || true
${xorp_hardkill_enable} || return 0
killall -9 -m xorp_\* || true
return 0
}
run_rc_command "$1"

View File

@ -0,0 +1,22 @@
#!/bin/sh
#
# $FreeBSD: /tmp/pcvs/ports/net/xorp-devel/pkg-deinstall,v 1.1 2009-12-08 10:53:09 bms Exp $
#
PATH=/bin:/usr/sbin
if [ -z "${XORP_GROUP}" ]; then
XORP_GROUP=xorp
fi
case $2 in
POST-DEINSTALL)
if pw group show ${XORP_GROUP} 2>/dev/null
then
echo "Deleting group ${XORP_GROUP}..."
pw groupdel -n ${XORP_GROUP} 2>/dev/null
else
echo "Group ${XORP_GROUP} not found!"
fi
;;
esac

14
net/xorp-devel/pkg-descr Normal file
View File

@ -0,0 +1,14 @@
XORP is the eXtensible Open Router Platform.
The XORP project is developing an open source software router. The software
is intended to be stable and fully featured enough for production use, and
flexible and extensible enough for research use. The software is covered by
a mixture of LGPLv2 / GPLv2 licenses, and the code is publicly available,
allowing for production deployment and commercial development.
This port is for the latest SVN version of XORP.
WWW: http://www.xorp.org/
Bruce
bms@FreeBSD.org

View File

@ -0,0 +1,36 @@
#!/bin/sh
#
# $FreeBSD: /tmp/pcvs/ports/net/xorp-devel/pkg-install,v 1.1 2009-12-08 10:53:10 bms Exp $
#
PATH=/bin:/usr/bin:/usr/sbin
if [ -z "${XORP_GROUP}" ]; then
XORP_GROUP=xorp
fi
case $2 in
POST-INSTALL)
if [ ! -f ${PREFIX}/etc/xorp.conf.sample ]; then \
cp ${WRKSRC}/rtrmgr/config/multicast4.boot \
${PREFIX}/etc/xorp.conf.sample; \
fi
if pw group show "${XORP_GROUP}" 2>/dev/null; then \
echo "You already have a group \"${XORP_GROUP}\", so I will use it."; \
else \
echo "Adding group \"${XORP_GROUP}\"."; \
pw groupadd -n ${XORP_GROUP} 2>/dev/null; \
fi
echo ""
echo "Add the following lines to /etc/rc.conf to enable xorp:"
echo ""
echo "defaultrouter=\"NO\""
echo "xorp_enable=\"YES\""
echo ""
echo "A configuration file must be created at ${PREFIX}/etc/xorp.conf before use."
echo ""
echo "Users who will be changing the xorp configuration via xorpsh"
echo "must be members of the group xorp."
echo ""
;;
esac

187
net/xorp-devel/pkg-plist Normal file
View File

@ -0,0 +1,187 @@
lib/xorp/bin/bgp_print_peers
lib/xorp/bin/bgp_print_routes
lib/xorp/bin/cli_generic
lib/xorp/bin/cli_send_processor_xrl
lib/xorp/bin/fea_click_config_generator
lib/xorp/bin/fea_show_interfaces
lib/xorp/bin/ospf_clear_database
lib/xorp/bin/ospf_print_lsas
lib/xorp/bin/ospf_print_neighbours
lib/xorp/bin/rib_show_distances
lib/xorp/bin/rib_show_routes
lib/xorp/bin/rip_show_peer_stats
lib/xorp/bin/rip_show_stats
%%XORP_SHLIB%%lib/xorp/lib/libxif_bgp.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_cli_manager.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_cli_processor.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_common.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_coord.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_datain.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_click.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_fib.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_fib_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_firewall.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_ifmgr.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_ifmgr_mirror.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_ifmgr_replicator.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawlink.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawlink_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawpkt4.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawpkt4_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawpkt6.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawpkt6_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fib2mrib.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_finder.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_finder_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_finder_event_notifier.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_finder_event_observer.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_fti.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_mfea.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_mfea_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_mld6igmp.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_mld6igmp_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_ospfv2.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_ospfv3.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_pim.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_policy.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_policy_backend.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_policy_redist4.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_policy_redist6.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_profile.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_profile_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_redist4.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_redist6.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_redist_transaction4.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_redist_transaction6.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_rib.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_rib_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_rip.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_ripng.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_rtrmgr.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_rtrmgr_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_socket4.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_socket4_user.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_socket6.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_socket6_user.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_static_routes.so
%%XORP_SHLIB%%lib/xorp/lib/libxif_vrrp.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_cli.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_comm.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_core.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_control_socket.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_data_plane_managers.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_fibconfig.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_firewall.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_ifconfig.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_io.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fib2mrib.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_finder.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_ipc.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_mld6igmp.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_mrt.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_ospf.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_pim.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_policy.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_policy_backend.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_policy_common.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_proto.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_rib.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_rip.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_rip_xrl.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_ripng.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_ripng_xrl.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_static_routes.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_tecla.so
%%XORP_SHLIB%%lib/xorp/lib/libxorp_vrrp.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_bgp.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_cli.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_coord.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_fea.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_fea_ifmgr_mirror.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_fib2mrib.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_finder.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_finder_client.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_mfea.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_mld6igmp.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_ospfv2.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_ospfv3.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_pim.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_policy.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_profiler.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_rib.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_ribclient.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_rip.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_ripng.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_rtrmgr.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_show_distances.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_show_routes.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_static_routes.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_vrrp.so
%%XORP_SHLIB%%lib/xorp/lib/libxst_xorpsh.so
lib/xorp/sbin/xorp_bgp
lib/xorp/sbin/xorp_fea
lib/xorp/sbin/xorp_fea_dummy
lib/xorp/sbin/xorp_fib2mrib
lib/xorp/sbin/xorp_igmp
lib/xorp/sbin/xorp_mld
lib/xorp/sbin/xorp_ospfv2
lib/xorp/sbin/xorp_ospfv3
lib/xorp/sbin/xorp_pimsm4
lib/xorp/sbin/xorp_pimsm6
lib/xorp/sbin/xorp_policy
lib/xorp/sbin/xorp_rib
lib/xorp/sbin/xorp_rip
lib/xorp/sbin/xorp_ripng
lib/xorp/sbin/xorp_static_routes
lib/xorp/sbin/xorp_vrrp
sbin/xorp_profiler
sbin/xorp_rtrmgr
sbin/xorpsh
share/xorp/templates/bgp.cmds
share/xorp/templates/bgp.tp
share/xorp/templates/fea.cmds
share/xorp/templates/fea.tp
share/xorp/templates/fib2mrib.tp
share/xorp/templates/firewall.tp
share/xorp/templates/host.cmds
share/xorp/templates/igmp.cmds
share/xorp/templates/igmp.tp
share/xorp/templates/interfaces.tp
share/xorp/templates/mfea.cmds
share/xorp/templates/mfea4.tp
share/xorp/templates/mfea6.cmds
share/xorp/templates/mfea6.tp
share/xorp/templates/misc.cmds
share/xorp/templates/mld.cmds
share/xorp/templates/mld.tp
share/xorp/templates/ospfv2.cmds
share/xorp/templates/ospfv2.tp
share/xorp/templates/ospfv3.cmds
share/xorp/templates/ospfv3.tp
share/xorp/templates/pim.cmds
share/xorp/templates/pim6.cmds
share/xorp/templates/pimsm4.tp
share/xorp/templates/pimsm6.tp
share/xorp/templates/plumbing.tp
share/xorp/templates/policy.cmds
share/xorp/templates/policy.tp
share/xorp/templates/protocols.tp
share/xorp/templates/rib.cmds
share/xorp/templates/rib.tp
share/xorp/templates/rip.cmds
share/xorp/templates/rip.tp
share/xorp/templates/ripng.cmds
share/xorp/templates/ripng.tp
share/xorp/templates/rtrmgr.tp
share/xorp/templates/static_routes.tp
share/xorp/templates/vrrp.cmds
share/xorp/templates/vrrp.tp
share/xorp/templates/xorpsh.cmds
@dirrm share/xorp/templates
@dirrm share/xorp
%%XORP_SHLIB%%@dirrm lib/xorp/lib
@dirrm lib/xorp/bin
@dirrm lib/xorp/sbin
@dirrm lib/xorp