aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/linknx/Makefile40
-rw-r--r--net/linknx/distinfo3
-rw-r--r--net/linknx/files/linknx.in58
-rw-r--r--net/linknx/files/patch-src_eibclient.c10
-rw-r--r--net/linknx/pkg-descr9
-rw-r--r--net/linknx/pkg-plist4
7 files changed, 125 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index fe7b8b2f5a11..0fe309d2f797 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -317,6 +317,7 @@
SUBDIR += linc
SUBDIR += linc-reference
SUBDIR += link-monitor-applet
+ SUBDIR += linknx
SUBDIR += linneighborhood
SUBDIR += linphone
SUBDIR += linphone-base
diff --git a/net/linknx/Makefile b/net/linknx/Makefile
new file mode 100644
index 000000000000..d58897ac3650
--- /dev/null
+++ b/net/linknx/Makefile
@@ -0,0 +1,40 @@
+# New ports collection makefile for: linknx
+# Date Created: 23 October 2008
+# Whom: Björn König <bkoenig@alpha-tierchen.de>
+#
+# $FreeBSD$
+#
+
+PORTNAME= linknx
+PORTVERSION= 0.0.1.25
+CATEGORIES= net
+MASTER_SITES= SF
+
+MAINTAINER= bkoenig@alpha-tierchen.de
+COMMENT= Rule-based event handling in a KNX installation
+
+LIB_DEPENDS= pthsem.20:${PORTSDIR}/devel/pthsem
+BUILD_DEPENDS= ${LOCALBASE}/lib/libargp.a:${PORTSDIR}/devel/argp-standalone
+
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+CONFIGURE_ARGS+=CFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-I${LOCALBASE}/include -L/${LOCALBASE}/lib"
+
+OPTIONS= LIBESMTP "Install libesmtp for SMTP support" on \
+ LIBCURL "Install libcurl for Clickatell SMS support" off
+
+.include <bsd.port.pre.mk>
+
+.if (defined(WITH_LIBESMTP) || exists(${LOCALBASE}/include/libesmtp.h))
+CONFIGURE+= --enable-smtp
+LIB_DEPENDS+= esmtp.6:${PORTSDIR}/mail/libesmtp
+.endif
+
+.if (defined(WITH_LIBCURL) || exists(${LOCALBASE}/lib/libcurl.so))
+LIB_DEPENDS+= curl.4:${PORTSDIR}/ftp/curl
+.endif
+
+USE_RC_SUBR= ${PORTNAME}
+
+.include <bsd.port.post.mk>
diff --git a/net/linknx/distinfo b/net/linknx/distinfo
new file mode 100644
index 000000000000..20ae2280d67a
--- /dev/null
+++ b/net/linknx/distinfo
@@ -0,0 +1,3 @@
+SHA256 (linknx-0.0.1.25.tar.gz) = 2ad2db638d0f1542f34c0dce80ce8c5519c70cea80286d70ad7b91d923c5ff28
+MD5 (linknx-0.0.1.25.tar.gz) = 2e85192b5d482e301da35afb8e67c68a
+SIZE (linknx-0.0.1.25.tar.gz) = 290886
diff --git a/net/linknx/files/linknx.in b/net/linknx/files/linknx.in
new file mode 100644
index 000000000000..5f5c78892d3f
--- /dev/null
+++ b/net/linknx/files/linknx.in
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: linknx
+# REQUIRE: DAEMON
+
+#
+# linknx_enable (bool): Set to "NO" by default. Set it
+# to "YES" to enable linknx.
+#
+# linknx_console (str): The output of the daemon goes to this
+# file. It is set to "/var/log/linknx.log"
+# by default. Set it to "" to disable it.
+# Recommended for production use.
+#
+# linknx_config (str): The default configuration file. By default
+# there is no configuration file set.
+#
+
+
+. "%%RC_SUBR%%"
+
+name="linknx"
+rcvar=`set_rcvar`
+
+start_precmd="linknx_precmd"
+
+: ${linknx_enable:="NO"}
+: ${linknx_console:="/var/log/linknx.log"}
+: ${linknx_config:=""}
+: ${linknx_pidfile:="/var/run/linknx.pid"}
+: ${linknx_flags:="--pid-file=${linknx_pidfile}"}
+
+command="/usr/local/bin/$name"
+pidfile=${linknx_pidfile}
+
+load_rc_config "$name"
+
+linknx_precmd()
+{
+ if [ -f "${linknx_console}" ]; then
+ echo "----------------" `date` "----------------" >> ${linknx_console}
+ fi
+}
+
+if [ "x${linknx_console}" != "x" ]; then
+ linknx_flags="${linknx_flags} --daemon=${linknx_console}"
+else
+ linknx_flags="${linknx_flags} --daemon"
+fi
+
+if [ "x${linknx_config}" != "x" ]; then
+ linknx_flags="${linknx_flags} --config=${linknx_config}"
+fi
+
+run_rc_command "$1"
diff --git a/net/linknx/files/patch-src_eibclient.c b/net/linknx/files/patch-src_eibclient.c
new file mode 100644
index 000000000000..76cb3c076bc8
--- /dev/null
+++ b/net/linknx/files/patch-src_eibclient.c
@@ -0,0 +1,10 @@
+--- src/eibclient.c.orig 2007-12-29 22:23:06.000000000 +0100
++++ src/eibclient.c 2008-10-23 20:15:56.000000000 +0200
+@@ -32,6 +32,7 @@
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include <errno.h>
++#include <string.h>
+
+ #include "config.h"
+
diff --git a/net/linknx/pkg-descr b/net/linknx/pkg-descr
new file mode 100644
index 000000000000..b9147df5752b
--- /dev/null
+++ b/net/linknx/pkg-descr
@@ -0,0 +1,9 @@
+LinKNX is a backend for controlling a KNX/EIB home and building automation
+system. It connects to eibd which is part of the BCU SDK and keeps state of
+KNX devices such as lamps, window blinds, heating and so on.
+Furthermore it provides a powerful, rule-based event after treatment, e.g.
+for switching other KNX devices, sending e-mail or SMS or executing a shell
+command. You can configure and control the LinKNX daemon using an XML-style
+protocol via TCP network socket or Unix domain socket.
+
+WWW: http://linknx.sourceforge.net/
diff --git a/net/linknx/pkg-plist b/net/linknx/pkg-plist
new file mode 100644
index 000000000000..b0d55daf3ff4
--- /dev/null
+++ b/net/linknx/pkg-plist
@@ -0,0 +1,4 @@
+bin/linknx
+%%DOCSDIR%%/linknx.xml
+%%DOCSDIR%%/linknx_doc.tgz
+@dirrm %%DOCSDIR%%