mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-08 06:48:28 +00:00
Mosquitto is an open source implementation of a server for version 3.1 of the
MQTT protocol. WWW: http://mosquitto.org/ PR: ports/189451 Submitted by: Joseph Benden <joe@thrallingpenguin.com>
This commit is contained in:
parent
2686164bfb
commit
8dc7ac012f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=355160
@ -378,6 +378,7 @@
|
||||
SUBDIR += mopd
|
||||
SUBDIR += morebalance
|
||||
SUBDIR += mosh
|
||||
SUBDIR += mosquitto
|
||||
SUBDIR += mpd-l2tp-ipv6pd-client
|
||||
SUBDIR += mpd5
|
||||
SUBDIR += mpich
|
||||
|
47
net/mosquitto/Makefile
Normal file
47
net/mosquitto/Makefile
Normal file
@ -0,0 +1,47 @@
|
||||
# Created by: Joseph Benden <joe@thrallingpenguin.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= mosquitto
|
||||
PORTVERSION= 1.3.1
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= http://mosquitto.org/files/source/
|
||||
|
||||
MAINTAINER= joe@thrallingpenguin.com
|
||||
COMMENT= Open-Source MQTT Broker
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
|
||||
LIB_DEPENDS= libcares.so:${PORTSDIR}/dns/c-ares
|
||||
BUILD_DEPENDS= xsltproc:${PORTSDIR}/textproc/libxslt
|
||||
|
||||
USES= cmake
|
||||
USE_PYTHON= 2
|
||||
NOCONFIGURE= yes
|
||||
USE_RC_SUBR= mosquitto
|
||||
MANCOMPRESSED= no
|
||||
NO_MANCOMPRESS= yes
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
USERS= nobody
|
||||
|
||||
PLIST_SUB= PYTHON_VER=${PYTHON_VER}
|
||||
|
||||
post-patch:
|
||||
${MV} ${WRKSRC}/mosquitto.conf ${WRKSRC}/mosquitto.conf.example
|
||||
|
||||
post-install:
|
||||
cd ${WRKSRC}/lib/python ; \
|
||||
${PYTHON_CMD} ${WRKSRC}/lib/python/setup.py build ; \
|
||||
${PYTHON_CMD} ${WRKSRC}/lib/python/setup.py install --prefix=${PREFIX} --root=${STAGEDIR}
|
||||
|
||||
# Compress Man Pages
|
||||
${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man8/mosquitto.8
|
||||
${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man7/mqtt.7
|
||||
${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man7/mosquitto-tls.7
|
||||
${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man5/mosquitto.conf.5
|
||||
${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man3/libmosquitto.3
|
||||
${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man1/mosquitto_sub.1
|
||||
${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man1/mosquitto_pub.1
|
||||
${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man1/mosquitto_passwd.1
|
||||
|
||||
.include <bsd.port.mk>
|
2
net/mosquitto/distinfo
Normal file
2
net/mosquitto/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (mosquitto-1.3.1.tar.gz) = 1ee649cb80e0bd0aed8476349aa4c15c667507e2fc69540f18e3a1c599ed85fd
|
||||
SIZE (mosquitto-1.3.1.tar.gz) = 350381
|
41
net/mosquitto/files/mosquitto.in
Normal file
41
net/mosquitto/files/mosquitto.in
Normal file
@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: mosquitto
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable mosquitto:
|
||||
#
|
||||
# mosquitto_enable="YES"
|
||||
# mosquitto_flags="<set as needed>"
|
||||
#
|
||||
# See mosquitto(8) for flags
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=mosquitto
|
||||
rcvar=mosquitto_enable
|
||||
|
||||
mosquitto_enable=${mosquitto_enable:="NO"}
|
||||
mosquitto_config=${mosquitto_config:="%%PREFIX%%/etc/mosquitto/mosquitto.conf"}
|
||||
|
||||
command=%%PREFIX%%/sbin/mosquitto
|
||||
command_args="-c ${mosquitto_config} -d"
|
||||
pidfile=$(grep pidfile ${mosquitto_config} | awk '{print($2)}')
|
||||
required_files=${mosquitto_config}
|
||||
|
||||
extra_commands="reload"
|
||||
stop_postcmd=stop_postcmd
|
||||
stop_postcmd()
|
||||
{
|
||||
rm -f $pidfile
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
17
net/mosquitto/files/patch-CMakeList.txt
Normal file
17
net/mosquitto/files/patch-CMakeList.txt
Normal file
@ -0,0 +1,17 @@
|
||||
--- CMakeLists.txt.orig 2014-05-16 15:15:44.000000000 -0700
|
||||
+++ CMakeLists.txt 2014-05-16 15:28:39.000000000 -0700
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
set (VERSION 1.3.1)
|
||||
|
||||
+link_directories(/usr/local/lib)
|
||||
+
|
||||
if (WIN32)
|
||||
execute_process(COMMAND cmd /c echo %DATE% %TIME% OUTPUT_VARIABLE TIMESTAMP
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
@@ -71,4 +73,4 @@
|
||||
# Install config file
|
||||
# ========================================
|
||||
|
||||
-install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION ${SYSCONFDIR})
|
||||
+install(FILES mosquitto.conf.example aclfile.example pskfile.example pwfile.example DESTINATION ${SYSCONFDIR})
|
12
net/mosquitto/files/patch-config.mk
Normal file
12
net/mosquitto/files/patch-config.mk
Normal file
@ -0,0 +1,12 @@
|
||||
--- config.mk.orig 2014-05-07 17:09:56.000000000 -0700
|
||||
+++ config.mk 2014-05-07 17:10:31.000000000 -0700
|
||||
@@ -213,6 +213,6 @@
|
||||
|
||||
|
||||
INSTALL?=install
|
||||
-prefix=/usr/local
|
||||
-mandir=${prefix}/share/man
|
||||
-localedir=${prefix}/share/locale
|
||||
+prefix=${PREFIX}
|
||||
+mandir=${PREFIX}/share/man
|
||||
+localedir=${PREFIX}/share/locale
|
29
net/mosquitto/files/patch-etc-mosquitto.conf.example
Normal file
29
net/mosquitto/files/patch-etc-mosquitto.conf.example
Normal file
@ -0,0 +1,29 @@
|
||||
--- mosquitto.conf 2014-05-07 16:08:10.000000000 -0700
|
||||
+++ mosquitto.conf 2014-05-07 16:13:05.000000000 -0700
|
||||
@@ -32,7 +32,7 @@
|
||||
# This should be set to /var/run/mosquitto.pid if mosquitto is
|
||||
# being run automatically on boot with an init script and
|
||||
# start-stop-daemon or similar.
|
||||
-#pid_file
|
||||
+pid_file /var/run/mosquitto.pid
|
||||
|
||||
# When run as root, drop privileges to this user and its primary
|
||||
# group.
|
||||
@@ -40,7 +40,7 @@
|
||||
# If run as a non-root user, this setting has no effect.
|
||||
# Note that on Windows this has no effect and so mosquitto should
|
||||
# be started by the user you wish it to run as.
|
||||
-#user mosquitto
|
||||
+user nobody
|
||||
|
||||
# The maximum number of QoS 1 and 2 messages currently inflight per
|
||||
# client.
|
||||
@@ -133,7 +133,7 @@
|
||||
#bind_address
|
||||
|
||||
# Port to use for the default listener.
|
||||
-#port 1883
|
||||
+port 1883
|
||||
|
||||
# The maximum number of client connections to allow. This is
|
||||
# a per listener setting.
|
10
net/mosquitto/files/patch-lib-tls_mosq.h
Normal file
10
net/mosquitto/files/patch-lib-tls_mosq.h
Normal file
@ -0,0 +1,10 @@
|
||||
--- lib/tls_mosq.h.orig 2014-05-07 14:39:22.000000000 -0700
|
||||
+++ lib/tls_mosq.h 2014-05-07 14:39:47.000000000 -0700
|
||||
@@ -33,6 +33,7 @@
|
||||
#ifdef WITH_TLS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
+#include <sys/socket.h>
|
||||
#ifdef WITH_TLS_PSK
|
||||
# if OPENSSL_VERSION_NUMBER >= 0x10000000
|
||||
# define REAL_WITH_TLS_PSK
|
11
net/mosquitto/files/patch-src-CMakeList.txt
Normal file
11
net/mosquitto/files/patch-src-CMakeList.txt
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/CMakeLists.txt.orig 2014-05-16 15:17:23.000000000 -0700
|
||||
+++ src/CMakeLists.txt 2014-05-16 15:18:03.000000000 -0700
|
||||
@@ -79,7 +79,7 @@
|
||||
if (APPLE)
|
||||
set (MOSQ_LIBS ${MOSQ_LIBS} dl m)
|
||||
else (APPLE)
|
||||
- set (MOSQ_LIBS ${MOSQ_LIBS} rt dl m)
|
||||
+ set (MOSQ_LIBS ${MOSQ_LIBS} rt m)
|
||||
endif (APPLE)
|
||||
endif (UNIX)
|
||||
|
4
net/mosquitto/pkg-descr
Normal file
4
net/mosquitto/pkg-descr
Normal file
@ -0,0 +1,4 @@
|
||||
Mosquitto is an open source implementation of a server for version 3.1 of the
|
||||
MQTT protocol.
|
||||
|
||||
WWW: http://mosquitto.org/
|
39
net/mosquitto/pkg-plist
Normal file
39
net/mosquitto/pkg-plist
Normal file
@ -0,0 +1,39 @@
|
||||
share/man/man8/mosquitto.8.gz
|
||||
share/man/man7/mqtt.7.gz
|
||||
share/man/man7/mosquitto-tls.7.gz
|
||||
share/man/man5/mosquitto.conf.5.gz
|
||||
share/man/man3/libmosquitto.3.gz
|
||||
share/man/man1/mosquitto_sub.1.gz
|
||||
share/man/man1/mosquitto_pub.1.gz
|
||||
share/man/man1/mosquitto_passwd.1.gz
|
||||
%%PYTHON_LIBDIR%%/site-packages/mosquitto.pyc
|
||||
%%PYTHON_LIBDIR%%/site-packages/mosquitto.py
|
||||
%%PYTHON_LIBDIR%%/site-packages/mosquitto-1.3.1-py%%PYTHON_VER%%.egg-info
|
||||
lib/libmosquittopp.so.1
|
||||
lib/libmosquittopp.so
|
||||
lib/libmosquitto.so.1
|
||||
lib/libmosquitto.so
|
||||
lib/libmosquitto.so.1.3.1
|
||||
lib/libmosquittopp.so.1.3.1
|
||||
include/mosquittopp.h
|
||||
include/mosquitto_plugin.h
|
||||
include/mosquitto.h
|
||||
bin/mosquitto_sub
|
||||
bin/mosquitto_pub
|
||||
bin/mosquitto_passwd
|
||||
sbin/mosquitto
|
||||
etc/mosquitto/pwfile.example
|
||||
etc/mosquitto/pskfile.example
|
||||
@unexec if cmp -s %D/etc/mosquitto/mosquitto.conf %D/etc/mosquitto/mosquitto.conf.example; then rm -f %D/etc/mosquitto/mosquitto.conf; fi
|
||||
etc/mosquitto/mosquitto.conf.example
|
||||
@exec cp -n %B/mosquitto.conf.example %B/mosquitto.conf
|
||||
etc/mosquitto/aclfile.example
|
||||
@dirrmtry etc/mosquitto
|
||||
@dirrmtry share/man/man8
|
||||
@dirrmtry share/man/man7
|
||||
@dirrmtry share/man/man5
|
||||
@dirrmtry share/man/man3
|
||||
@dirrmtry share/man/man1
|
||||
@dirrmtry share/man
|
||||
@dirrmtry %%PYTHON_LIBDIR%%/site-packages
|
||||
@dirrmtry %%PYTHON_LIBDIR%%
|
Loading…
Reference in New Issue
Block a user