diff options
author | pi <pi@FreeBSD.org> | 2016-03-25 17:40:48 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2016-03-25 17:40:48 +0800 |
commit | 47a136d311aa19cc4d28a6927204d82e5cc8b355 (patch) | |
tree | 99bdf93d522ed1972ddc2652474b75e1a558b2ba /net | |
parent | 0121da0bd3bed38c4950c730df79b00202f3b4b4 (diff) | |
download | freebsd-ports-gnome-47a136d311aa19cc4d28a6927204d82e5cc8b355.tar.gz freebsd-ports-gnome-47a136d311aa19cc4d28a6927204d82e5cc8b355.tar.zst freebsd-ports-gnome-47a136d311aa19cc4d28a6927204d82e5cc8b355.zip |
New port: net/freediameter
freeDiameter provides an extensible platform for deploying
a Diameter network for your Authentication, Authorization
and Accounting needs, whether you are involved in research
or a network operator.
WWW: http://www.freediameter.net/
PR: 197368
Submitted by: Nikola Kolev <koue@chaosophia.net>, Pablo Carboni <pcarboni@gmail.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/freediameter/Makefile | 27 | ||||
-rw-r--r-- | net/freediameter/distinfo | 2 | ||||
-rw-r--r-- | net/freediameter/files/freediameterd.in | 47 | ||||
-rw-r--r-- | net/freediameter/files/patch-libfdcore_sctp.c | 11 | ||||
-rw-r--r-- | net/freediameter/pkg-descr | 6 | ||||
-rw-r--r-- | net/freediameter/pkg-plist | 32 |
7 files changed, 126 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 53106d8a4cc4..8a2428ff27a2 100644 --- a/net/Makefile +++ b/net/Makefile @@ -137,6 +137,7 @@ SUBDIR += fping SUBDIR += freebsd-tftp SUBDIR += freebsd-uucp + SUBDIR += freediameter SUBDIR += freenet6 SUBDIR += freeradius-client SUBDIR += freeradius2 diff --git a/net/freediameter/Makefile b/net/freediameter/Makefile new file mode 100644 index 000000000000..7342655680d3 --- /dev/null +++ b/net/freediameter/Makefile @@ -0,0 +1,27 @@ +# $FreeBSD$ + +PORTNAME= freeDiameter +PORTVERSION= 1.2.0 +CATEGORIES= net +MASTER_SITES= http://www.freediameter.net/hg/freeDiameter/archive/ + +MAINTAINER= koue@chaosophia.net +COMMENT= Open source Diameter protocol implementation + +LICENSE= BSD3CLAUSE + +LIB_DEPENDS= libgcrypt.so:${PORTSDIR}/security/libgcrypt \ + libgnutls.so:${PORTSDIR}/security/gnutls + +USES= cmake bison +USE_LDCONFIG= yes +CMAKE_ARGS+= -DSCTP_USE_MAPPED_ADDRESSES:BOOL=ON + +.include <bsd.port.options.mk> + +.if ${OSVERSION} < 1000033 +BUILD_DEPENDS+= ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex +CMAKE_ARGS+= -DFLEX_EXECUTABLE:FILEPATH="${LOCALBASE}/bin/flex" +.endif + +.include <bsd.port.mk> diff --git a/net/freediameter/distinfo b/net/freediameter/distinfo new file mode 100644 index 000000000000..eb42287218a8 --- /dev/null +++ b/net/freediameter/distinfo @@ -0,0 +1,2 @@ +SHA256 (freeDiameter-1.2.0.tar.gz) = 0601a7f559af6596dff8e18f5c9b17bc66de50d8e05640aa64a3403a841cb228 +SIZE (freeDiameter-1.2.0.tar.gz) = 855257 diff --git a/net/freediameter/files/freediameterd.in b/net/freediameter/files/freediameterd.in new file mode 100644 index 000000000000..a33938580270 --- /dev/null +++ b/net/freediameter/files/freediameterd.in @@ -0,0 +1,47 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: freediameterd +# REQUIRE: LOGIN syslogd +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# freediameterd_enable (bool): Set to NO by default. +# Set it to YES to enable freediameterd. +# freediameterd_flags (str): Set to "" by default. +# Extra flags passed to start command. + +. /etc/rc.subr + +name=freediameterd +rcvar=freediameterd_enable +desc="The freeDiameter daemon" + +load_rc_config $name + +: ${freediameterd_enable:=NO} + +command=%%PREFIX%%/sbin/freeDiameterd +pidfile=/var/run/${name}.pid + +start_cmd=freediameterd_start +stop_postcmd="[ -f ${pidfile} ] && /bin/rm -f ${pidfile}" + +freediameterd_start() +{ + pid=$(check_pidfile $pidfile $command) + + if [ -n "${pid}" ]; then + echo "Already running? (pid=${pid})" + return 1 + fi + + echo "Starting ${name}." + ( /usr/sbin/daemon -c -p ${pidfile} ${command} ${freediameterd_flags} 2>&1 ) | \ + /usr/bin/logger -t "`basename ${command}`[`/bin/cat ${pidfile} 2>/dev/null`]" -p daemon.notice & +} + +run_rc_command "$1" diff --git a/net/freediameter/files/patch-libfdcore_sctp.c b/net/freediameter/files/patch-libfdcore_sctp.c new file mode 100644 index 000000000000..e1ec18bff294 --- /dev/null +++ b/net/freediameter/files/patch-libfdcore_sctp.c @@ -0,0 +1,11 @@ +--- libfdcore/sctp.c.orig 2013-09-14 10:09:01 UTC ++++ libfdcore/sctp.c +@@ -575,7 +575,7 @@ static int fd_setsockopt_prebind(int sk) + + struct sctp_event event; + +- for (i = 0; i < (sizeof(events_I_want) / sizeof(events_I_want[0]) - 1; i++) { ++ for (i = 0; i < (sizeof(events_I_want) / sizeof(events_I_want[0]) - 1); i++) { + memset(&event, 0, sizeof(event)); + event.se_type = events_I_want[i]; + event.se_on = 1; diff --git a/net/freediameter/pkg-descr b/net/freediameter/pkg-descr new file mode 100644 index 000000000000..d16b583bb3ae --- /dev/null +++ b/net/freediameter/pkg-descr @@ -0,0 +1,6 @@ +freeDiameter provides an extensible platform for deploying +a Diameter network for your Authentication, Authorization +and Accounting needs, whether you are involved in research +or a network operator. + +WWW: http://www.freediameter.net/ diff --git a/net/freediameter/pkg-plist b/net/freediameter/pkg-plist new file mode 100644 index 000000000000..94f4a0eb4aec --- /dev/null +++ b/net/freediameter/pkg-plist @@ -0,0 +1,32 @@ +bin/freeDiameterd +bin/freeDiameterd-1.2.0 +include/freeDiameter/freeDiameter-host.h +include/freeDiameter/libfdproto.h +include/freeDiameter/libfdcore.h +include/freeDiameter/extension.h +lib/libfdproto.so +lib/libfdproto.so.6 +lib/libfdproto.so.1.2.0 +lib/libfdcore.so +lib/libfdcore.so.6 +lib/libfdcore.so.1.2.0 +lib/freeDiameter/dict_nasreq.fdx +lib/freeDiameter/dict_eap.fdx +lib/freeDiameter/dict_dcca.fdx +lib/freeDiameter/dict_dcca_3gpp.fdx +lib/freeDiameter/dict_dcca_starent.fdx +lib/freeDiameter/dict_sip.fdx +lib/freeDiameter/dict_mip6a.fdx +lib/freeDiameter/dict_mip6i.fdx +lib/freeDiameter/dict_nas_mipv6.fdx +lib/freeDiameter/dict_rfc5777.fdx +lib/freeDiameter/rt_default.fdx +lib/freeDiameter/rt_redirect.fdx +lib/freeDiameter/rt_busypeers.fdx +lib/freeDiameter/rt_ignore_dh.fdx +lib/freeDiameter/rt_load_balance.fdx +lib/freeDiameter/acl_wl.fdx +lib/freeDiameter/dbg_monitor.fdx +lib/freeDiameter/dbg_msg_timings.fdx +lib/freeDiameter/dbg_rt.fdx +lib/freeDiameter/dbg_msg_dumps.fdx |