diff --git a/net/quagga/Makefile b/net/quagga/Makefile index edce72330110..84eeeebf2b27 100644 --- a/net/quagga/Makefile +++ b/net/quagga/Makefile @@ -1,109 +1,137 @@ PORTNAME= quagga PORTVERSION= 1.2.4 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= net -MASTER_SITES= https://github.com/Quagga/quagga/releases/download/${DISTNAME}/ +MASTER_SITES= https://github.com/Quagga/quagga/releases/download/${DISTNAME}/ \ + http://www.grosbein.net/freebsd/distfiles/ \ + LOCAL/eugen MAINTAINER= eugen@FreeBSD.org COMMENT= Free RIPv1, RIPv2, OSPFv2, BGP4, IS-IS route software WWW= https://www.quagga.net/ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING USES= compiler:c11 cpe gmake libtool makeinfo \ - perl5 readline ssl + perl5 readline -CONFLICTS= frr7 openbgpd pimd zebra GNU_CONFIGURE= yes CONFIGURE_ENV+= GAWK=${AWK} CFLAGS+= -fcommon INSTALL_TARGET= install-strip -USE_LDCONFIG= yes USE_PERL5= build INFO= quagga -OPTIONS_DEFINE= ISISD PIMD PAM RTADV SNMP TCPSOCKETS DLMALLOC \ +OPTIONS_DEFINE= LEGACY ISISD PIMD PAM RTADV SNMP TCPSOCKETS DLMALLOC \ NO_BGP_ANNOUNCE OSPF_NEXTHOP ISIS_TOPOLOGY EXAMPLES # IRDP needs something freebsd does not seem to have: # configure: error: 'IRDP requires in_pktinfo at the moment!' -OPTIONS_DEFAULT= ISISD PIMD RTADV +OPTIONS_DEFAULT= LEGACY ISISD PIMD RTADV OPTIONS_SUB= yes +LEGACY_DESC= Install to legacy paths (conflicts with FRR etc.) PIMD_DESC= PIM-SSM multicast routing IRDP_DESC= Enable IRDP server support ISISD_DESC= Enable ISIS daemon (beta) ISIS_TOPOLOGY_DESC= Enable IS-IS topology generator PAM_DESC= PAM authentication for vtysh RTADV_DESC= IPv6 Router Advertisements TCPSOCKETS_DESC= Use TCP/IP sockets for protocol daemons DLMALLOC_DESC= Use dlmalloc (makes bgpd much faster) NO_BGP_ANNOUNCE_DESC= Turn off BGP route announcement OSPF_NEXTHOP_DESC= Set ip next-hop in OSPF route maps ENABLE_USER?= quagga ENABLE_GROUP?= quagga USERS= ${ENABLE_USER} GROUPS= ${ENABLE_GROUP} SYSCONF_DIR?= ${ETCDIR} LOCALSTATE_DIR?=/var/run/quagga CONFIGURE_ARGS= --enable-user=${ENABLE_USER} \ --enable-group=${ENABLE_GROUP} \ --sysconfdir=${SYSCONF_DIR} \ --localstatedir=${LOCALSTATE_DIR} \ --enable-vtysh .if defined(ENABLE_VTY_GROUP) CONFIGURE_ARGS+=--enable-vty-group=${ENABLE_VTY_GROUP} .endif EXAMPLES_CONFIGURE_ON= --enable-exampledir=${PREFIX}/share/examples/quagga EXAMPLES_CONFIGURE_OFF= --disable-exampledir ISISD_CONFIGURE_ENABLE= isisd ISIS_TOPOLOGY_CONFIGURE_ENABLE= isis-topology PIMD_CONFIGURE_ENABLE= pimd IRDP_CONFIGURE_ENABLE= irdp PAM_CONFIGURE_WITH= libpam RTADV_CONFIGURE_ENABLE= rtadv SNMP_CONFIGURE_ENABLE= snmp SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp TCPSOCKETS_CONFIGURE_ENABLE= tcp-zebra DLMALLOC_LIB_DEPENDS= libdlmalloc.so:devel/libdlmalloc DLMALLOC_LIBS= -L${LOCALBASE}/lib -ldlmalloc OSPF_NEXTHOP_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-ospf-nexthop # inverse option. NO_BGP_ANNOUNCE_CONFIGURE_ON= --disable-bgp-announce NO_BGP_ANNOUNCE_CONFIGURE_OFF= --enable-bgp-announce USE_RC_SUBR= quagga watchquagga +LEGACY_SUB_LIST= VTYSH=vtysh N= +LEGACY_SUB_LIST_OFF= VTYSH=qvtysh N=${PORTNAME}/ +LEGACY_PLIST_SUB= VTYSH=vtysh N= +LEGACY_PLIST_SUB_OFF= VTYSH=qvtysh N=${PORTNAME}/ + SUB_LIST+= LOCALSTATE_DIR=${LOCALSTATE_DIR} \ SYSCONF_DIR=${SYSCONF_DIR} PLIST_SUB+= LOCALSTATE_DIR=${LOCALSTATE_DIR} \ SYSCONF_DIR=${SYSCONF_DIR} \ ENABLE_USER=${ENABLE_USER} \ ENABLE_GROUP=${ENABLE_GROUP} 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} "SYSCONF_DIR Specify directory for Quagga configuration files" @${ECHO} "LOCALSTATE_DIR Specify directory for Quagga runtime files" post-install: ${MKDIR} ${STAGEDIR}${LOCALSTATE_DIR} ${STAGEDIR}${SYSCONF_DIR} +.include + +.if ${PORT_OPTIONS:MLEGACY} +CONFLICTS= frr7 openbgpd pimd +USE_LDCONFIG= yes +.else +PKGNAMESUFFIX= -compat +QPREFIX= ${PREFIX}/${PORTNAME} +GNU_CONFIGURE_PREFIX= ${QPREFIX} +MANPREFIX= ${QPREFIX} +MANDIRS= ${QPREFIX}/man +USE_LDCONFIG= ${QPREFIX}/lib +CONFIGURE_ARGS+= --datarootdir=${QPREFIX} \ + --bindir=${PREFIX}/bin \ + --includedir=${PREFIX}/include + +post-install-LEGACY-off: + ${MV} ${STAGEDIR}${PREFIX}/bin/vtysh ${STAGEDIR}${PREFIX}/bin/qvtysh + ${MV} ${STAGEDIR}${QPREFIX}/${INFO_PATH}/${PORTNAME}* ${STAGEDIR}${PREFIX}/${INFO_PATH}/ + +.endif + .include diff --git a/net/quagga/pkg-message b/net/quagga/files/pkg-message.in similarity index 86% rename from net/quagga/pkg-message rename to net/quagga/files/pkg-message.in index 39a462ff3210..3c1b5716e9b6 100644 --- a/net/quagga/pkg-message +++ b/net/quagga/files/pkg-message.in @@ -1,17 +1,19 @@ [ { type: install message: </dev/null 2>&1 && break; waited_for=$((${waited_for}+1)) sleep 1; done [ ${waited_for} -lt ${quagga_wait_seconds} ] || echo Giving up... fi } do_cmd() { local ret ret=0 for daemon in ${quagga_daemons}; do - command=%%PREFIX%%/sbin/${daemon} + command=%%PREFIX%%/%%N%%sbin/${daemon} required_files=%%SYSCONF_DIR%%/${daemon}.conf pidfile=%%LOCALSTATE_DIR%%/${daemon}.pid if [ ${quagga_cmd} = "restart" -o ${quagga_cmd} = "start" ]; then check_config fi if [ ${quagga_cmd} = "start" -a ! -f ${required_files} ]; then continue fi if [ ${quagga_cmd} = "stop" -a -z $(check_process ${command}) ]; then continue fi eval flags=\$\{${daemon}_flags:-\"${quagga_flags}\"\} name=${daemon} _rc_restart_done=false run_rc_command "$1" || ret=1 done if checkyesno quagga_vtysh_boot; then echo "Booting for integrated-vtysh-config..." - %%PREFIX%%/bin/vtysh -b + %%PREFIX%%/bin/%%VTYSH%% -b fi return ${ret} } quagga_cmd=$1 case "$1" in force*) quagga_cmd=${quagga_cmd#force} ;; fast*) quagga_cmd=${quagga_cmd#fast} ;; esac shift if [ $# -ge 1 ]; then quagga_daemons="$*" fi case "${quagga_cmd}" in start) if [ -n "${quagga_extralibs_path}" ]; then /sbin/ldconfig -m ${quagga_extralibs_path} fi do_cmd "start" ;; stop) quagga_daemons=$(reverse_list ${quagga_daemons}) do_cmd "stop" ;; restart) quagga_daemons=$(reverse_list ${quagga_daemons}) do_cmd "stop" quagga_daemons=$(reverse_list ${quagga_daemons}) do_cmd "start" ;; *) do_cmd "${quagga_cmd}" ;; esac diff --git a/net/quagga/files/watchquagga.in b/net/quagga/files/watchquagga.in index 6e1176f483dc..737a9f3cc6ba 100644 --- a/net/quagga/files/watchquagga.in +++ b/net/quagga/files/watchquagga.in @@ -1,27 +1,27 @@ #!/bin/sh # PROVIDE: watchquagga # REQUIRE: NETWORKING quagga # KEYWORD: shutdown # Add the following line to /etc/rc.conf to enable watchquagga: # watchquagga_enable="YES" # # You may also wish to use the following variables to fine-tune startup: # watchquagga_flags . /etc/rc.subr name=watchquagga rcvar=watchquagga_enable load_rc_config $name stop_postcmd="rm -f $pidfile" watchquagga_enable=${watchquagga_enable:-"NO"} -command=%%PREFIX%%/sbin/watchquagga +command=%%PREFIX%%/%%N%%sbin/watchquagga pidfile=%%LOCALSTATE_DIR%%/watchquagga.pid run_rc_command "$1" diff --git a/net/quagga/pkg-plist b/net/quagga/pkg-plist index c25931a835d9..a5f68a9cbc8e 100644 --- a/net/quagga/pkg-plist +++ b/net/quagga/pkg-plist @@ -1,109 +1,109 @@ bin/bgp_btoa %%PIMD%%bin/test_igmpv3_join -bin/vtysh +bin/%%VTYSH%% include/quagga/buffer.h include/quagga/checksum.h include/quagga/command.h include/quagga/distribute.h include/quagga/event_counter.h include/quagga/fifo.h include/quagga/filter.h include/quagga/getopt.h include/quagga/hash.h include/quagga/if.h include/quagga/if_rmap.h include/quagga/jhash.h include/quagga/keychain.h include/quagga/libospf.h include/quagga/linklist.h include/quagga/log.h include/quagga/md5.h include/quagga/memory.h include/quagga/memtypes.h include/quagga/network.h include/quagga/nexthop.h include/quagga/ospfapi/ospf_apiclient.h include/quagga/ospfd/ospf_api.h include/quagga/ospfd/ospf_asbr.h include/quagga/ospfd/ospf_dump.h include/quagga/ospfd/ospf_ism.h include/quagga/ospfd/ospf_lsa.h include/quagga/ospfd/ospf_lsdb.h include/quagga/ospfd/ospf_nsm.h include/quagga/ospfd/ospf_opaque.h include/quagga/ospfd/ospfd.h include/quagga/plist.h include/quagga/pqueue.h include/quagga/prefix.h include/quagga/privs.h include/quagga/route_types.h include/quagga/routemap.h include/quagga/sigevent.h include/quagga/smux.h include/quagga/sockopt.h include/quagga/sockunion.h include/quagga/str.h include/quagga/stream.h include/quagga/table.h include/quagga/thread.h include/quagga/vector.h include/quagga/version.h include/quagga/vrf.h include/quagga/vty.h include/quagga/workqueue.h include/quagga/zassert.h include/quagga/zclient.h include/quagga/zebra.h -lib/libfpm_pb.a -lib/libfpm_pb.so -lib/libfpm_pb.so.0 -lib/libfpm_pb.so.0.0.0 -lib/libospf.a -lib/libospf.so -lib/libospf.so.0 -lib/libospf.so.0.0.0 -lib/libospfapiclient.a -lib/libospfapiclient.so -lib/libospfapiclient.so.0 -lib/libospfapiclient.so.0.0.0 -lib/libquagga_pb.a -lib/libquagga_pb.so -lib/libquagga_pb.so.0 -lib/libquagga_pb.so.0.0.0 -lib/libzebra.a -lib/libzebra.so -lib/libzebra.so.1 -lib/libzebra.so.1.0.0 -man/man1/vtysh.1.gz -man/man8/bgpd.8.gz -%%ISISD%%man/man8/isisd.8.gz -man/man8/ospf6d.8.gz -man/man8/ospfclient.8.gz -man/man8/ospfd.8.gz -%%PIMD%%man/man8/pimd.8.gz -man/man8/ripd.8.gz -man/man8/ripngd.8.gz -man/man8/watchquagga.8.gz -man/man8/zebra.8.gz -sbin/bgpd -%%ISISD%%sbin/isisd -sbin/ospf6d -sbin/ospfclient -sbin/ospfd -%%PIMD%%sbin/pimd -sbin/ripd -sbin/ripngd -sbin/watchquagga -sbin/zebra +%%N%%lib/libfpm_pb.a +%%N%%lib/libfpm_pb.so +%%N%%lib/libfpm_pb.so.0 +%%N%%lib/libfpm_pb.so.0.0.0 +%%N%%lib/libospf.a +%%N%%lib/libospf.so +%%N%%lib/libospf.so.0 +%%N%%lib/libospf.so.0.0.0 +%%N%%lib/libospfapiclient.a +%%N%%lib/libospfapiclient.so +%%N%%lib/libospfapiclient.so.0 +%%N%%lib/libospfapiclient.so.0.0.0 +%%N%%lib/libquagga_pb.a +%%N%%lib/libquagga_pb.so +%%N%%lib/libquagga_pb.so.0 +%%N%%lib/libquagga_pb.so.0.0.0 +%%N%%lib/libzebra.a +%%N%%lib/libzebra.so +%%N%%lib/libzebra.so.1 +%%N%%lib/libzebra.so.1.0.0 +%%N%%man/man1/vtysh.1.gz +%%N%%man/man8/bgpd.8.gz +%%ISISD%%%%N%%man/man8/isisd.8.gz +%%N%%man/man8/ospf6d.8.gz +%%N%%man/man8/ospfclient.8.gz +%%N%%man/man8/ospfd.8.gz +%%PIMD%%%%N%%man/man8/pimd.8.gz +%%N%%man/man8/ripd.8.gz +%%N%%man/man8/ripngd.8.gz +%%N%%man/man8/watchquagga.8.gz +%%N%%man/man8/zebra.8.gz +%%N%%sbin/bgpd +%%ISISD%%%%N%%sbin/isisd +%%N%%sbin/ospf6d +%%N%%sbin/ospfclient +%%N%%sbin/ospfd +%%PIMD%%%%N%%sbin/pimd +%%N%%sbin/ripd +%%N%%sbin/ripngd +%%N%%sbin/watchquagga +%%N%%sbin/zebra %%EXAMPLES%%%%EXAMPLESDIR%%/bgpd.conf.sample %%EXAMPLES%%%%EXAMPLESDIR%%/bgpd.conf.sample2 %%EXAMPLES%%%%ISISD%%%%EXAMPLESDIR%%/isisd.conf.sample %%EXAMPLES%%%%EXAMPLESDIR%%/ospf6d.conf.sample %%EXAMPLES%%%%EXAMPLESDIR%%/ospfd.conf.sample %%EXAMPLES%%%%PIMD%%%%EXAMPLESDIR%%/pimd.conf.sample %%EXAMPLES%%%%EXAMPLESDIR%%/ripd.conf.sample %%EXAMPLES%%%%EXAMPLESDIR%%/ripngd.conf.sample %%EXAMPLES%%%%EXAMPLESDIR%%/vtysh.conf.sample %%EXAMPLES%%%%EXAMPLESDIR%%/zebra.conf.sample @dir(%%ENABLE_USER%%,%%ENABLE_GROUP%%,750) %%LOCALSTATE_DIR%% @dir(%%ENABLE_USER%%,%%ENABLE_GROUP%%,750) %%SYSCONF_DIR%%