diff options
author | glarkin <glarkin@FreeBSD.org> | 2010-02-02 23:45:00 +0800 |
---|---|---|
committer | glarkin <glarkin@FreeBSD.org> | 2010-02-02 23:45:00 +0800 |
commit | 03f5b9659b4e68804f837b3b0b93a240b6f9ef19 (patch) | |
tree | ad160e54a84b38771bb8fd3020884341e3b3da2f /net | |
parent | 9f8f7ed125e583a481730e8919fd75f5b92b90a2 (diff) | |
download | freebsd-ports-gnome-03f5b9659b4e68804f837b3b0b93a240b6f9ef19.tar.gz freebsd-ports-gnome-03f5b9659b4e68804f837b3b0b93a240b6f9ef19.tar.zst freebsd-ports-gnome-03f5b9659b4e68804f837b3b0b93a240b6f9ef19.zip |
This is a port of IBM's Really Small Message Broker (RSMB). RSMB is a small
message broker that implements the MQTT protocol (http://mqtt.org/).
This port installs the Linux binary for use with the Linuxulator.
WWW: http://www.alphaworks.ibm.com/tech/rsmb
PR: ports/140445
Submitted by: Andrew Stevenson <andrew at ugh.net.au>
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/rsmb/Makefile | 52 | ||||
-rw-r--r-- | net/rsmb/distinfo | 3 | ||||
-rw-r--r-- | net/rsmb/files/broker.cfg | 30 | ||||
-rw-r--r-- | net/rsmb/files/rsmbd.in | 33 | ||||
-rw-r--r-- | net/rsmb/pkg-descr | 6 | ||||
-rw-r--r-- | net/rsmb/pkg-plist | 6 |
7 files changed, 131 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 523d03d40dc7..4cd54898dc75 100644 --- a/net/Makefile +++ b/net/Makefile @@ -859,6 +859,7 @@ SUBDIR += roadrunner SUBDIR += rp-pppoe SUBDIR += rshell + SUBDIR += rsmb SUBDIR += rsync SUBDIR += rtg SUBDIR += rtpbreak diff --git a/net/rsmb/Makefile b/net/rsmb/Makefile new file mode 100644 index 000000000000..ca7f888eaff8 --- /dev/null +++ b/net/rsmb/Makefile @@ -0,0 +1,52 @@ +# New ports collection makefile for: rsmb +# Date created: 9 Nov 2009 +# Whom: Andrew Stevenson <andrew@ugh.net.au> +# +# $FreeBSD$ +# + +PORTNAME= rsmb +PORTVERSION= 1.1.0 +CATEGORIES= net linux +MASTER_SITES= # +DISTNAME= ${PORTNAME}_${PORTVERSION} + +MAINTAINER= andrew@ugh.net.au +COMMENT= Really Small Message Broker, an MQTT supporting server + +NO_BUILD= yes +NO_WRKSUBDIR= yes +USE_ZIP= yes +USE_LINUX= yes +LINUX_OSRELEASE=2.6.16 +IA32_BINARY_PORT= yes +RESTRICTED= \nPlease visit http://www.alphaworks.ibm.com/tech/rsmb/download +RESTRICTED+= \nto register for an account, agree to the license and download +RESTRICTED+= \n${DISTFILES}. +RESTRICTED+= \nMove the file to ${DISTDIR} and restart the build.\n\n +USE_RC_SUBR= rsmbd +PLIST_SUB= PORTVERSION=${PORTVERSION} + +.include <bsd.port.pre.mk> + +.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) +DISTFILE_INSTRUCTIONS= ${RESTRICTED} +.endif + +pre-fetch: +.if defined(DISTFILE_INSTRUCTIONS) + @${PRINTF} "${DISTFILE_INSTRUCTIONS}" + @${FALSE} +.endif + +do-install: +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/gettingstarted.htm ${DOCSDIR} +.endif + ${MKDIR} ${PREFIX}/libexec/rsmb + ${INSTALL_PROGRAM} ${WRKSRC}/broker.redhat ${PREFIX}/libexec/rsmb/broker + ${INSTALL_DATA} ${WRKSRC}/Messages.${PORTVERSION} ${PREFIX}/libexec/rsmb/ + ${INSTALL_DATA} ${FILESDIR}/broker.cfg ${PREFIX}/etc/broker.cfg.dist + +.include <bsd.port.post.mk> diff --git a/net/rsmb/distinfo b/net/rsmb/distinfo new file mode 100644 index 000000000000..e0db5c2bb5fa --- /dev/null +++ b/net/rsmb/distinfo @@ -0,0 +1,3 @@ +MD5 (rsmb_1.1.0.zip) = a9ab25a15cae3780cefaa2559b1d740d +SHA256 (rsmb_1.1.0.zip) = 2b188c2f79e3e194468b96b220fd3daaae78b844f8a51e4ec05b02fb79683f6f +SIZE (rsmb_1.1.0.zip) = 385330 diff --git a/net/rsmb/files/broker.cfg b/net/rsmb/files/broker.cfg new file mode 100644 index 000000000000..6f1dcebb2a0c --- /dev/null +++ b/net/rsmb/files/broker.cfg @@ -0,0 +1,30 @@ +# Example configuration file for RSMB. See gettingstarted.htm for details. + +# specify the port on which to listen +#port 1883 + +# limit the number of concurrent clients (-1 is no limit) +#max_connections -1 + +# limit the number of messages that can be queued for an individual +# subscription +#max_queued_messages 100 + +# save retained messages and durable subscriptions to disk on shutdown and +# restore on startup +#persistence false + +# directory to use to store persistence files (if persistence is true) +#persistence_location /var/spool/rsmb + +# specify the logging level. 30 is no extra logging, 20 includes protocol +# tracing and 10 includes everything. logs are published to the topic +# '$SYS/broker/log' +#trace_level 30 + +# the MQTT bridge can be used to connect one instance of RSMB to another (or +# indeed any MQTT capable broker) for the purpose of exchanging messages. +# +#connection MyOtherBroker +#address broker.example.org:1883 +#topic # diff --git a/net/rsmb/files/rsmbd.in b/net/rsmb/files/rsmbd.in new file mode 100644 index 000000000000..19227918f536 --- /dev/null +++ b/net/rsmb/files/rsmbd.in @@ -0,0 +1,33 @@ +#!/bin/sh + +# PROVIDE: rsmbd +# REQUIRE: NETWORKING +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# rsmbd_enable (bool): Set to NO by default. +# Set it to YES to enable rsmbd. +# rsmbd_config (path): Unset by default. +# + +. %%RC_SUBR%% + +name="rsmbd" +rcvar=`set_rcvar` +eval "${name}_installdir=\${${name}_installdir:-'%%PREFIX%%/libexec/rsmb'}" +eval "command=\${${name}_installdir}/broker" + +start_cmd="${name}_start" + +load_rc_config $name + +eval "${rcvar}=\${${rcvar}:-'NO'}" + +rsmbd_start() { + echo "Starting ${name}." + cd %%PREFIX%%/libexec/rsmb && %%PREFIX%%/libexec/rsmb/broker ${rsmbd_config} > /dev/null 2>&1 & +} + +run_rc_command "$1" + diff --git a/net/rsmb/pkg-descr b/net/rsmb/pkg-descr new file mode 100644 index 000000000000..c7ebc8049b78 --- /dev/null +++ b/net/rsmb/pkg-descr @@ -0,0 +1,6 @@ +This is a port of IBM's Really Small Message Broker (RSMB). RSMB is a small +message broker that implements the MQTT protocol (http://mqtt.org/). + +This port installs the Linux binary for use with the Linuxulator. + +WWW: http://www.alphaworks.ibm.com/tech/rsmb diff --git a/net/rsmb/pkg-plist b/net/rsmb/pkg-plist new file mode 100644 index 000000000000..232074b31aed --- /dev/null +++ b/net/rsmb/pkg-plist @@ -0,0 +1,6 @@ +libexec/rsmb/broker +libexec/rsmb/Messages.%%PORTVERSION%% +etc/broker.cfg.dist +@dirrm libexec/rsmb +%%PORTDOCS%%%%DOCSDIR%%/gettingstarted.htm +%%PORTDOCS%%@dirrm %%DOCSDIR%% |