diff options
author | Philip M. Gollucci <pgollucci@FreeBSD.org> | 2010-12-15 22:44:42 +0000 |
---|---|---|
committer | Philip M. Gollucci <pgollucci@FreeBSD.org> | 2010-12-15 22:44:42 +0000 |
commit | 42b4f324571548074e6f59ef8ccf0ce244cf4f7c (patch) | |
tree | 1e5b78c5682e46e36bbe0fe39ecf55747d818b95 /net/beacon | |
parent | ed6b4e991a233a41a0d12b11d4ddabc6a41f2f4b (diff) | |
download | ports-42b4f324571548074e6f59ef8ccf0ce244cf4f7c.tar.gz ports-42b4f324571548074e6f59ef8ccf0ce244cf4f7c.zip |
Notes
Diffstat (limited to 'net/beacon')
-rw-r--r-- | net/beacon/Makefile | 16 | ||||
-rw-r--r-- | net/beacon/files/beacon.in | 38 | ||||
-rw-r--r-- | net/beacon/files/patch-Makefile.in | 11 | ||||
-rw-r--r-- | net/beacon/files/patch-common-beacon.patch | 18 | ||||
-rw-r--r-- | net/beacon/files/patch-libbeacon-Makefile.in | 11 |
5 files changed, 73 insertions, 21 deletions
diff --git a/net/beacon/Makefile b/net/beacon/Makefile index 62d40839858f..c3285585a4b3 100644 --- a/net/beacon/Makefile +++ b/net/beacon/Makefile @@ -7,16 +7,15 @@ PORTNAME= beacon PORTVERSION= 1.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net perl5 mbone ipv6 MASTER_SITES= http://dast.nlanr.net/Projects/Beacon/releases/ -DISTNAME= ${PORTNAME}-${PORTVERSION} MAINTAINER= janos.mohacsi@bsd.hu COMMENT= Beacon active measurement tool to monitor multicast BUILD_DEPENDS= ${SITE_PERL}/Net/Domain.pm:${PORTSDIR}/net/p5-Net -RUN_DEPENDS= ${BUILD_DEPENDS} +RUN_DEPENDS= ${SITE_PERL}/Net/Domain.pm:${PORTSDIR}/net/p5-Net WWW_DIR?= ${PREFIX}/www/ PLIST_SUB+= VERSION=${PORTVERSION} @@ -35,17 +34,12 @@ CONFIGURE_ARGS+= --enable-ipv6 .include <bsd.port.pre.mk> -.if ${ARCH} != "i386" -BROKEN= Does not compile on !i386 -.endif - post-install: - @${ECHO} "Sample config installed at \ - ${PREFIX}/etc/beacon.conf.sample" + @${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} + @${MKDIR} ${DOCSDIR}/ + @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/ .endif .include <bsd.port.post.mk> diff --git a/net/beacon/files/beacon.in b/net/beacon/files/beacon.in index 321a6240e05f..86fdb8d57b07 100644 --- a/net/beacon/files/beacon.in +++ b/net/beacon/files/beacon.in @@ -8,23 +8,41 @@ # # Add the following lines to /etc/rc.conf to enable beacon. # -# beacon_enable="YES" - -beacon_enable=${beacon_enable-"NO"} +# 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` -command="%%PREFIX%%/bin/${name}" - -conffile=%%PREFIX%%/etc/beacon.conf -if [ -f $conffile ]; then - piddir=`grep OUTPUTDIR $conffile | awk '{print $3}'` +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=${piddir}/multicastbeacon.PID +pidfile="${beacon_pidfile:-${outputdir}/multicastbeacon.PID}" +command_interpreter="%%PREFIX%%/bin/perl" -load_rc_config $name +start_cmd="beacon_start" + +beacon_start() +{ + echo "Starting ${name}." + daemon -u ${buser} -f ${command} +} run_rc_command "$1" diff --git a/net/beacon/files/patch-Makefile.in b/net/beacon/files/patch-Makefile.in new file mode 100644 index 000000000000..38674344c88b --- /dev/null +++ b/net/beacon/files/patch-Makefile.in @@ -0,0 +1,11 @@ +--- 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@ diff --git a/net/beacon/files/patch-common-beacon.patch b/net/beacon/files/patch-common-beacon.patch new file mode 100644 index 000000000000..b0e405b51d4d --- /dev/null +++ b/net/beacon/files/patch-common-beacon.patch @@ -0,0 +1,18 @@ +--- 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" ++ diff --git a/net/beacon/files/patch-libbeacon-Makefile.in b/net/beacon/files/patch-libbeacon-Makefile.in new file mode 100644 index 000000000000..340b333a69ec --- /dev/null +++ b/net/beacon/files/patch-libbeacon-Makefile.in @@ -0,0 +1,11 @@ +--- 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@ |