mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
- Update to 1.4
- Fix MASTER_SITES - Update home page to SF site since previous page doesn't respond - Use included rc script - Remove patches included upstream - Remove unneeded 'CONFIGURE_ARGS=' - Don't unnecessarily include bsd.port.pre.mk/bsd.port.post.mk - Remove messages about config files. pkg-message could be used, but isn't necessary PR: ports/154519 Approved by: maintainer timeout
This commit is contained in:
parent
d506cda3cc
commit
2100930b65
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=272497
@ -6,10 +6,9 @@
|
||||
#
|
||||
|
||||
PORTNAME= beacon
|
||||
PORTVERSION= 1.3
|
||||
PORTREVISION= 4
|
||||
PORTVERSION= 1.4
|
||||
CATEGORIES= net perl5 mbone ipv6
|
||||
MASTER_SITES= http://dast.nlanr.net/Projects/Beacon/releases/
|
||||
MASTER_SITES= SF/multicastbeacon/multicastbeacon/beacon%20v${PORTVERSION}
|
||||
|
||||
MAINTAINER= janos.mohacsi@bsd.hu
|
||||
COMMENT= Beacon active measurement tool to monitor multicast
|
||||
@ -21,25 +20,18 @@ WWW_DIR?= ${PREFIX}/www/
|
||||
PLIST_SUB+= VERSION=${PORTVERSION}
|
||||
USE_PERL5= yes
|
||||
USE_AUTOTOOLS= autoconf
|
||||
USE_RC_SUBR= beacon
|
||||
|
||||
.ifdef(WITHOUT_IPV6)
|
||||
CONFIGURE_ARGS=
|
||||
.else
|
||||
#enable IPv6 name lookup, and sending IPv6 multicast
|
||||
OPTIONS= IPV6 "Enable IPv6 PTR lookups" off
|
||||
|
||||
.ifdef(WITH_IPV6)
|
||||
BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Socket6.pm:${PORTSDIR}/net/p5-Socket6
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_beacon.in
|
||||
CONFIGURE_ARGS+= --enable-ipv6
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
post-install:
|
||||
@${ECHO} "Sample config installed at ${PREFIX}/etc/beacon.conf.sample"
|
||||
@${ECHO} "Copy the customised version to ${PREFIX}/etc/beacon.conf"
|
||||
.ifndef(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}/
|
||||
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (beacon-1.3.tar.gz) = ce036fb927045c6270cf3fa504b5988856ed4cd975aefd3f23a8e6c076ba32b6
|
||||
SIZE (beacon-1.3.tar.gz) = 411823
|
||||
SHA256 (beacon-1.4.tar.gz) = 0143199f2405a3c93e9f0b5d7ebf61b4877ac664f5209d180b1dbd72ce43f673
|
||||
SIZE (beacon-1.4.tar.gz) = 464268
|
||||
|
@ -1,48 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: beacon
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable beacon.
|
||||
#
|
||||
# beacon_enable="YES"
|
||||
#
|
||||
# Optional settings:
|
||||
#
|
||||
# beacon_program (default: %%PREFIX%%/bin/beacon)
|
||||
# beacon_config (default: %%PREFIX%%/etc/beacon.conf)
|
||||
# beacon_user (default: daemon)
|
||||
# beacon_outputdir (default: %%PREFIX%%/www/data-dist/beacon)
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="beacon"
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
load_rc_config $name
|
||||
command=${beacon_program:-%%PREFIX%%/bin/${name}}
|
||||
config=${beacon_config:-%%PREFIX%%/etc/${name}.conf}
|
||||
buser=${beacon_user:-nobody}
|
||||
outputdir="${beacon_outputdir:-%%PREFIX%%/www/data-dist/beacon}"
|
||||
if [ -f ${config} ]; then
|
||||
toutputdir="`awk '$1 == "OUTPUTDIR" {print $3}' ${config}`"
|
||||
if [ -d "${toutputdir}" ]; then
|
||||
outputdir="${toutputdir}"
|
||||
fi
|
||||
fi
|
||||
pidfile="${beacon_pidfile:-${outputdir}/multicastbeacon.PID}"
|
||||
command_interpreter="%%PREFIX%%/bin/perl"
|
||||
|
||||
start_cmd="beacon_start"
|
||||
|
||||
beacon_start()
|
||||
{
|
||||
echo "Starting ${name}."
|
||||
daemon -u ${buser} -f ${command}
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
@ -1,95 +0,0 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- src/beacon.in.orig
|
||||
+++ src/beacon.in
|
||||
@@ -34,6 +34,7 @@
|
||||
use Net::Multicast::Beacon; # Make rtp.c RTP calls available in Perl
|
||||
use Getopt::Long; # Allow both -g -p and --group --port cmd lines
|
||||
use IO::Socket; # For reverse IP lookups to get hostname
|
||||
+use Socket6; # For reverse IPv6 lookup
|
||||
use IO::Select;
|
||||
use Net::Domain; # For getting the FQDN of the current host
|
||||
use Sys::Hostname; # Other way of getting the name of the current host
|
||||
@@ -3387,21 +3388,41 @@
|
||||
$thishost = $host;
|
||||
$thisuser = $user;
|
||||
|
||||
-my $packed = gethostbyname($host);
|
||||
-if (! defined $packed) { # Couldn't get it - Mark it bad
|
||||
- $thisip = "UNKN";
|
||||
-} else { # Unpack it into a string var
|
||||
- $thisip = inet_ntoa($packed); # "141.142.2.168"
|
||||
-}
|
||||
+#if group address an IPv6 address, we have to find IPv6 addresses
|
||||
|
||||
-# Do the best job we can do for getting FQDN for the hostname
|
||||
-my $lookup = gethostbyaddr(inet_aton($thisip), AF_INET);
|
||||
-if (defined $lookup) { # Only update if it worked
|
||||
- $thishost = $host = $lookup;
|
||||
+if ($GROUP =~ ":" ) {
|
||||
+ my @res=getaddrinfo($host,'daytime',AF_INET6);
|
||||
+ my($packed,$port) = getnameinfo($res[3],NI_NUMERICHOST);
|
||||
+ my($packed2,$port2) = getnameinfo($res[3]);
|
||||
+
|
||||
+ if( !defined $packed) {
|
||||
+ $thisip = "UNKN";
|
||||
+ } else {
|
||||
+ $thisip = $packed;
|
||||
+ }
|
||||
+ if (!defined $packed2) {
|
||||
+ $thishost = $host = $packed2;
|
||||
+ } else {
|
||||
+ $thishost = $thisip;
|
||||
+ }
|
||||
} else {
|
||||
- $thishost = $thisip;
|
||||
+ my $packed = gethostbyname($host);
|
||||
+ if (! defined $packed) { # Couldn't get i t - Mark it bad
|
||||
+ $thisip = "UNKN";
|
||||
+ } else { # Unpack it into a string var
|
||||
+ $thisip = inet_ntoa($packed); # "141.142.2.168"
|
||||
+ }
|
||||
+
|
||||
+ # Do the best job we can do for getting FQDN for the hostname
|
||||
+ my $lookup = gethostbyaddr(inet_aton($thisip), AF_INET);
|
||||
+ if (defined $lookup) { # Only update if it worked
|
||||
+ $thishost = $host = $lookup;
|
||||
+ } else {
|
||||
+ $thishost = $thisip;
|
||||
+ }
|
||||
}
|
||||
|
||||
+
|
||||
# If host still "UNKN" at this point, things are too confused to continue
|
||||
if ($thishost eq "UNKN") {
|
||||
die "Unable to resolve hostname -- Please check your system
|
||||
@@ -3642,11 +3663,23 @@
|
||||
|
||||
# Get the IP address of the hostname given in $h
|
||||
my $hostip;
|
||||
- my $packed = gethostbyname($h);
|
||||
- if (! defined $packed) { # Couldn't get it - Mark it bad
|
||||
- $hostip = "UNKN";
|
||||
- } else { # Unpack it into a string var
|
||||
- $hostip = inet_ntoa($packed);
|
||||
+ if ( $GROUP =~ ":" ) {
|
||||
+ my @res = getaddrinfo($h,'daytime', AF_INET6);
|
||||
+ my ($packed,$port) = getnameinfo($res[3],NI_NUMERICHOST);
|
||||
+ my ($packed2,$port2) = getnameinfo($res[3]);
|
||||
+ if(defined $packed) {
|
||||
+ $hostip = $packed;
|
||||
+ }
|
||||
+ if(defined $packed2) {
|
||||
+ $hostip = $packed2;
|
||||
+ }
|
||||
+ } else {
|
||||
+ my $packed = gethostbyname($h);
|
||||
+ if (! defined $packed) { # Couldn't get it - Mark it bad
|
||||
+ $hostip = "UNKN";
|
||||
+ } else { # Unpack it into a string var
|
||||
+ $hostip = inet_ntoa($packed);
|
||||
+ }
|
||||
}
|
||||
|
||||
# Create a sortname using hostname and SSRC
|
@ -1,11 +0,0 @@
|
||||
--- Makefile.in.orig 2005-08-26 13:22:44.000000000 -0700
|
||||
+++ Makefile.in 2010-07-30 17:37:58.000000000 -0700
|
||||
@@ -45,7 +45,7 @@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
-CFLAGS = @CFLAGS@
|
||||
+CFLAGS = @CFLAGS@ -fPIC -DHAVE_INET_NTOP
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
@ -1,18 +0,0 @@
|
||||
--- common-beacon.patch.orig 2005-06-15 18:46:40.000000000 -0700
|
||||
+++ common-beacon.patch 2010-07-30 17:34:45.000000000 -0700
|
||||
@@ -46,3 +46,15 @@
|
||||
|
||||
#if !defined(WORDS_BIGENDIAN) && !defined(WORDS_SMALLENDIAN)
|
||||
#error RTP library requires WORDS_BIGENDIAN or WORDS_SMALLENDIAN to be defined.
|
||||
+--- common/src/net_udp.c 2004-06-29 09:21:37.000000000 -0700
|
||||
++++ common-beacon/src/net_udp.c 2010-07-30 17:28:06.000000000 -0700
|
||||
+@@ -44,7 +44,9 @@
|
||||
+ #include "debug.h"
|
||||
+ #include "memory.h"
|
||||
+ #include "inet_pton.h"
|
||||
++#ifndef HAVE_INET_NTOP
|
||||
+ #include "inet_ntop.h"
|
||||
++#endif
|
||||
+ #include "vsnprintf.h"
|
||||
+ #include "net_udp.h"
|
||||
+
|
@ -1,11 +0,0 @@
|
||||
--- libbeacon/Makefile.in.orig 2010-07-30 17:13:05.000000000 -0700
|
||||
+++ libbeacon/Makefile.in 2010-07-30 17:13:12.000000000 -0700
|
||||
@@ -45,7 +45,7 @@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
-CFLAGS = @CFLAGS@
|
||||
+CFLAGS = @CFLAGS@ -fPIC
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
@ -1,13 +0,0 @@
|
||||
--- src/Makefile.in.orig Fri Apr 28 22:29:11 2006
|
||||
+++ src/Makefile.in Fri Apr 28 22:30:22 2006
|
||||
@@ -160,8 +160,8 @@
|
||||
@list='$(dist_sysconf_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
- echo " $(dist_sysconfDATA_INSTALL) $$d$$p $(DESTDIR)$(sysconfdir)/$$f"; \
|
||||
- $(dist_sysconfDATA_INSTALL) $$d$$p $(DESTDIR)$(sysconfdir)/$$f; \
|
||||
+ echo " $(dist_sysconfDATA_INSTALL) $$d$$p $(DESTDIR)$(sysconfdir)/$$f.sample"; \
|
||||
+ $(dist_sysconfDATA_INSTALL) $$d$$p $(DESTDIR)$(sysconfdir)/$$f.sample; \
|
||||
done
|
||||
|
||||
uninstall-dist_sysconfDATA:
|
@ -4,4 +4,4 @@ a given multicast group.
|
||||
The Multicast Beacon can be used as a general-purpose active multicast
|
||||
measurement tool.
|
||||
|
||||
WWW: http://dast.nlanr.net/Projects/Beacon/
|
||||
WWW: http://sourceforge.net/projects/multicastbeacon/
|
||||
|
@ -12,3 +12,4 @@ bin/beacon
|
||||
etc/beacon.conf.sample
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
etc/rc.d/beacon
|
||||
|
Loading…
Reference in New Issue
Block a user