ports/189451: [patch] New port of net/mosquitto version 1.3.1
Joseph Benden
joe at thrallingpenguin.com
Thu May 8 00:30:00 UTC 2014
>Number: 189451
>Category: ports
>Synopsis: [patch] New port of net/mosquitto version 1.3.1
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu May 08 00:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Joseph Benden
>Release: FreeBSD 11
>Organization:
>Environment:
FreeBSD lucy 11.0-CURRENT FreeBSD 11.0-CURRENT #4 r264887: Thu Apr 24 12:43:46 MST 2014 root at lucy:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
This is a new port of Mosquitto MQTT Broker.
(warning: first time I've created a port from scratch. I maintain many ports though.)
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# net/mosquitto
# net/mosquitto/Makefile
# net/mosquitto/distinfo
# net/mosquitto/files
# net/mosquitto/files/patch-Makefile
# net/mosquitto/files/patch-lib-tls_mosq.h
# net/mosquitto/files/mosquitto.in
# net/mosquitto/files/patch-Makefile2
# net/mosquitto/files/patch-config.mk
# net/mosquitto/files/patch-lib-Makefile
# net/mosquitto/files/patch-src-Makefile
# net/mosquitto/files/patch-client-Makefile
# net/mosquitto/files/patch-etc-mosquitto.conf.example
# net/mosquitto/files/patch-lib-python-Makefile
# net/mosquitto/pkg-plist
# net/mosquitto/pkg-descr
#
echo c - net/mosquitto
mkdir -p net/mosquitto > /dev/null 2>&1
echo x - net/mosquitto/Makefile
sed 's/^X//' >net/mosquitto/Makefile << '0ac3ba1e1320dc6cbcdf528ccb6e87b8'
X# Created by: Joseph Benden <joe at thrallingpenguin.com>
X# $FreeBSD$
X
XPORTNAME= mosquitto
XPORTVERSION= 1.3.1
XCATEGORIES= net
XMASTER_SITES= http://mosquitto.org/files/source/
X
XMAINTAINER= joe at thrallingpenguin.com
XCOMMENT= An Open-Source MQTT Broker
X
XLICENSE= BSD3CLAUSE
X
XLIB_DEPENDS= libcares.so:${PORTSDIR}/dns/c-ares
XBUILD_DEPENDS= xsltproc:${PORTSDIR}/textproc/libxslt
X
XUSES= gmake
XUSE_PYTHON= yes
XNOCONFIGURE= yes
XUSE_RC_SUBR= mosquitto
X
XUSERS= nobody
X
X.post-extract:
X ${TOUCH} ${WRKSRC}/BSD
X
X.include <bsd.port.pre.mk>
X.include <bsd.port.post.mk>
0ac3ba1e1320dc6cbcdf528ccb6e87b8
echo x - net/mosquitto/distinfo
sed 's/^X//' >net/mosquitto/distinfo << '432cbefac535e9c6c50df4a7944108e5'
XSHA256 (mosquitto-1.3.1.tar.gz) = 1ee649cb80e0bd0aed8476349aa4c15c667507e2fc69540f18e3a1c599ed85fd
XSIZE (mosquitto-1.3.1.tar.gz) = 350381
432cbefac535e9c6c50df4a7944108e5
echo c - net/mosquitto/files
mkdir -p net/mosquitto/files > /dev/null 2>&1
echo x - net/mosquitto/files/patch-Makefile
sed 's/^X//' >net/mosquitto/files/patch-Makefile << '6e6d6687f4eee766c7d96d119adc96a0'
X--- Makefile.orig 2014-05-07 14:28:26.000000000 -0700
X+++ Makefile 2014-05-07 14:29:06.000000000 -0700
X@@ -1,5 +1,7 @@
X include config.mk
X
X+CFLAGS=-I/usr/local/include
X+LDFLAGS=-L/usr/local/lib
X DIRS=lib client src
X DOCDIRS=man
X DISTDIRS=man
6e6d6687f4eee766c7d96d119adc96a0
echo x - net/mosquitto/files/patch-lib-tls_mosq.h
sed 's/^X//' >net/mosquitto/files/patch-lib-tls_mosq.h << 'a1e9ab735c268de5de57c88853efbd05'
X--- lib/tls_mosq.h.orig 2014-05-07 14:39:22.000000000 -0700
X+++ lib/tls_mosq.h 2014-05-07 14:39:47.000000000 -0700
X@@ -33,6 +33,7 @@
X #ifdef WITH_TLS
X
X #include <openssl/ssl.h>
X+#include <sys/socket.h>
X #ifdef WITH_TLS_PSK
X # if OPENSSL_VERSION_NUMBER >= 0x10000000
X # define REAL_WITH_TLS_PSK
a1e9ab735c268de5de57c88853efbd05
echo x - net/mosquitto/files/mosquitto.in
sed 's/^X//' >net/mosquitto/files/mosquitto.in << '6ac7a2e4efc1ed716a7da91fd5227372'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X
X# PROVIDE: mosquitto
X# REQUIRE: DAEMON
X# BEFORE: LOGIN
X# KEYWORD: shutdown
X
X#
X# Add the following lines to /etc/rc.conf to enable mosquitto:
X#
X# mosquitto_enable="YES"
X# mosquitto_flags="<set as needed>"
X#
X# See mosquitto(8) for flags
X#
X
X. /etc/rc.subr
X
Xname=mosquitto
Xrcvar=mosquitto_enable
X
Xmosquitto_enable=${mosquitto_enable:="NO"}
Xmosquitto_config=${mosquitto_config:="%%PREFIX%%/etc/mosquitto/mosquitto.conf"}
X
Xcommand=%%PREFIX%%/sbin/mosquitto
Xcommand_args="-c ${mosquitto_config} -d"
Xpidfile=$(grep pidfile ${mosquitto_config} | awk '{print($2)}')
Xrequired_files=${mosquitto_config}
X
Xextra_commands="reload"
Xstop_postcmd=stop_postcmd
Xstop_postcmd()
X{
X rm -f $pidfile
X}
X
Xload_rc_config $name
Xrun_rc_command "$1"
6ac7a2e4efc1ed716a7da91fd5227372
echo x - net/mosquitto/files/patch-Makefile2
sed 's/^X//' >net/mosquitto/files/patch-Makefile2 << '87be960e7ed4853521f73c56038ed5e6'
X--- Makefile.orig 2014-05-07 15:24:27.000000000 -0700
X+++ Makefile 2014-05-07 15:26:08.000000000 -0700
X@@ -35,11 +35,11 @@
X install : mosquitto
X set -e; for d in ${DIRS}; do $(MAKE) -C $${d} install; done
X set -e; for d in ${DOCDIRS}; do $(MAKE) -C $${d} install; done
X- $(INSTALL) -d ${DESTDIR}/etc/mosquitto
X- $(INSTALL) -m 644 mosquitto.conf ${DESTDIR}/etc/mosquitto/mosquitto.conf.example
X- $(INSTALL) -m 644 aclfile.example ${DESTDIR}/etc/mosquitto/aclfile.example
X- $(INSTALL) -m 644 pwfile.example ${DESTDIR}/etc/mosquitto/pwfile.example
X- $(INSTALL) -m 644 pskfile.example ${DESTDIR}/etc/mosquitto/pskfile.example
X+ $(INSTALL) -d ${DESTDIR}/${PREFIX}/etc/mosquitto
X+ $(INSTALL) -m 644 mosquitto.conf ${DESTDIR}/${PREFIX}/etc/mosquitto/mosquitto.conf.example
X+ $(INSTALL) -m 644 aclfile.example ${DESTDIR}/${PREFIX}/etc/mosquitto/aclfile.example
X+ $(INSTALL) -m 644 pwfile.example ${DESTDIR}/${PREFIX}/etc/mosquitto/pwfile.example
X+ $(INSTALL) -m 644 pskfile.example ${DESTDIR}/${PREFIX}/etc/mosquitto/pskfile.example
X
X uninstall :
X set -e; for d in ${DIRS}; do $(MAKE) -C $${d} uninstall; done
87be960e7ed4853521f73c56038ed5e6
echo x - net/mosquitto/files/patch-config.mk
sed 's/^X//' >net/mosquitto/files/patch-config.mk << '108ca82e92c2ba6ccb80469d8bf98a1b'
X--- config.mk.orig 2014-05-07 17:09:56.000000000 -0700
X+++ config.mk 2014-05-07 17:10:31.000000000 -0700
X@@ -213,6 +213,6 @@
X
X
X INSTALL?=install
X-prefix=/usr/local
X-mandir=${prefix}/share/man
X-localedir=${prefix}/share/locale
X+prefix=${PREFIX}
X+mandir=${PREFIX}/share/man
X+localedir=${PREFIX}/share/locale
108ca82e92c2ba6ccb80469d8bf98a1b
echo x - net/mosquitto/files/patch-lib-Makefile
sed 's/^X//' >net/mosquitto/files/patch-lib-Makefile << '67a9a86f45e67420a9cf7a90c1b5b652'
X--- lib/Makefile.orig 2014-05-07 15:35:08.000000000 -0700
X+++ lib/Makefile 2014-05-07 15:35:40.000000000 -0700
X@@ -24,18 +24,18 @@
X $(MAKE) -C python
X
X install : all
X- $(INSTALL) -d ${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/
X- $(INSTALL) -s libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}
X- ln -sf libmosquitto.so.${SOVERSION} ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so
X- $(INSTALL) -d ${DESTDIR}${prefix}/include/
X- $(INSTALL) mosquitto.h ${DESTDIR}${prefix}/include/mosquitto.h
X+ $(INSTALL) -d ${DESTDIR}$(PREFIX)/lib${LIB_SUFFIX}/
X+ $(INSTALL) -s libmosquitto.so.${SOVERSION} ${DESTDIR}${PREFIX}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}
X+ ln -sf libmosquitto.so.${SOVERSION} ${DESTDIR}${PREFIX}/lib${LIB_SUFFIX}/libmosquitto.so
X+ $(INSTALL) -d ${DESTDIR}${PREFIX}/include/
X+ $(INSTALL) mosquitto.h ${DESTDIR}${PREFIX}/include/mosquitto.h
X $(MAKE) -C cpp install
X $(MAKE) -C python install
X
X uninstall :
X- -rm -f ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}
X- -rm -f ${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so
X- -rm -f ${DESTDIR}${prefix}/include/mosquitto.h
X+ -rm -f ${DESTDIR}${PREFIX}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}
X+ -rm -f ${DESTDIR}${PREFIX}/lib${LIB_SUFFIX}/libmosquitto.so
X+ -rm -f ${DESTDIR}${PREFIX}/include/mosquitto.h
X
X reallyclean : clean
X
67a9a86f45e67420a9cf7a90c1b5b652
echo x - net/mosquitto/files/patch-src-Makefile
sed 's/^X//' >net/mosquitto/files/patch-src-Makefile << '9b2a03edaa29f86a56a6d0816977272c'
X--- src/Makefile.orig 2014-05-07 15:36:52.000000000 -0700
X+++ src/Makefile 2014-05-07 15:37:39.000000000 -0700
X@@ -99,17 +99,17 @@
X ${CC} $(CFLAGS) ${CPPFLAGS} -c $< -o $@
X
X install : all
X- $(INSTALL) -d ${DESTDIR}$(prefix)/sbin
X- $(INSTALL) -s mosquitto ${DESTDIR}${prefix}/sbin/mosquitto
X- $(INSTALL) mosquitto_plugin.h ${DESTDIR}${prefix}/include/mosquitto_plugin.h
X+ $(INSTALL) -d ${DESTDIR}$(PREFIX)/sbin
X+ $(INSTALL) -s mosquitto ${DESTDIR}${PREFIX}/sbin/mosquitto
X+ $(INSTALL) mosquitto_plugin.h ${DESTDIR}${PREFIX}/include/mosquitto_plugin.h
X ifeq ($(WITH_TLS),yes)
X- $(INSTALL) -s mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd
X+ $(INSTALL) -s mosquitto_passwd ${DESTDIR}${PREFIX}/bin/mosquitto_passwd
X endif
X
X uninstall :
X- -rm -f ${DESTDIR}${prefix}/sbin/mosquitto
X- -rm -f ${DESTDIR}${prefix}/include/mosquitto_plugin.h
X- -rm -f ${DESTDIR}${prefix}/bin/mosquitto_passwd
X+ -rm -f ${DESTDIR}${PREFIX}/sbin/mosquitto
X+ -rm -f ${DESTDIR}${PREFIX}/include/mosquitto_plugin.h
X+ -rm -f ${DESTDIR}${PREFIX}/bin/mosquitto_passwd
X
X clean :
X -rm -f *.o mosquitto mosquitto_passwd
9b2a03edaa29f86a56a6d0816977272c
echo x - net/mosquitto/files/patch-client-Makefile
sed 's/^X//' >net/mosquitto/files/patch-client-Makefile << '7e6e331c1769794fe97309b475d58793'
X--- client/Makefile.orig 2014-05-07 15:39:05.000000000 -0700
X+++ client/Makefile 2014-05-07 15:39:22.000000000 -0700
X@@ -20,13 +20,13 @@
X $(MAKE) -C ../lib
X
X install : all
X- $(INSTALL) -d ${DESTDIR}$(prefix)/bin
X- $(INSTALL) -s mosquitto_pub ${DESTDIR}${prefix}/bin/mosquitto_pub
X- $(INSTALL) -s mosquitto_sub ${DESTDIR}${prefix}/bin/mosquitto_sub
X+ $(INSTALL) -d ${DESTDIR}$(PREFIX)/bin
X+ $(INSTALL) -s mosquitto_pub ${DESTDIR}${PREFIX}/bin/mosquitto_pub
X+ $(INSTALL) -s mosquitto_sub ${DESTDIR}${PREFIX}/bin/mosquitto_sub
X
X uninstall :
X- -rm -f ${DESTDIR}${prefix}/bin/mosquitto_pub
X- -rm -f ${DESTDIR}${prefix}/bin/mosquitto_sub
X+ -rm -f ${DESTDIR}${PREFIX}/bin/mosquitto_pub
X+ -rm -f ${DESTDIR}${PREFIX}/bin/mosquitto_sub
X
X reallyclean : clean
X
7e6e331c1769794fe97309b475d58793
echo x - net/mosquitto/files/patch-etc-mosquitto.conf.example
sed 's/^X//' >net/mosquitto/files/patch-etc-mosquitto.conf.example << '6962b3da3bc0ac7b1c7d01248decc954'
X--- mosquitto.conf 2014-05-07 16:08:10.000000000 -0700
X+++ mosquitto.conf 2014-05-07 16:13:05.000000000 -0700
X@@ -32,7 +32,7 @@
X # This should be set to /var/run/mosquitto.pid if mosquitto is
X # being run automatically on boot with an init script and
X # start-stop-daemon or similar.
X-#pid_file
X+pid_file /var/run/mosquitto.pid
X
X # When run as root, drop privileges to this user and its primary
X # group.
X@@ -40,7 +40,7 @@
X # If run as a non-root user, this setting has no effect.
X # Note that on Windows this has no effect and so mosquitto should
X # be started by the user you wish it to run as.
X-#user mosquitto
X+user nobody
X
X # The maximum number of QoS 1 and 2 messages currently inflight per
X # client.
X@@ -133,7 +133,7 @@
X #bind_address
X
X # Port to use for the default listener.
X-#port 1883
X+port 1883
X
X # The maximum number of client connections to allow. This is
X # a per listener setting.
6962b3da3bc0ac7b1c7d01248decc954
echo x - net/mosquitto/files/patch-lib-python-Makefile
sed 's/^X//' >net/mosquitto/files/patch-lib-python-Makefile << '983320ffff08a78991f49a4a4535676a'
X--- lib/python/Makefile.orig 2014-05-07 16:38:47.000000000 -0700
X+++ lib/python/Makefile 2014-05-07 16:39:40.000000000 -0700
X@@ -13,13 +13,13 @@
X
X ifeq ($(WITH_PYTHON),yes)
X install : all
X- python ./setup.py install --prefix=${prefix} --root=${DESTDIR}
X+ python2.7 ./setup.py install --prefix=${prefix} --root=${DESTDIR}
X else
X install :
X endif
X
X mosquitto.pyc : mosquitto.py
X- python ./setup.py build
X+ python2.7 ./setup.py build
X
X clean :
X -rm -rf build mosquitto.pyc __pycache__
983320ffff08a78991f49a4a4535676a
echo x - net/mosquitto/pkg-plist
sed 's/^X//' >net/mosquitto/pkg-plist << 'eec9fc7572767ca43b77952c7e1119c0'
Xshare/man/man8/mosquitto.8
Xshare/man/man7/mqtt.7
Xshare/man/man7/mosquitto-tls.7
Xshare/man/man5/mosquitto.conf.5
Xshare/man/man3/libmosquitto.3
Xshare/man/man1/mosquitto_sub.1
Xshare/man/man1/mosquitto_pub.1
Xshare/man/man1/mosquitto_passwd.1
Xlib/python2.7/site-packages/mosquitto.pyc
Xlib/python2.7/site-packages/mosquitto.py
Xlib/python2.7/site-packages/mosquitto-1.3.1-py2.7.egg-info
Xlib/libmosquittopp.so.1
Xlib/libmosquittopp.so
Xlib/libmosquitto.so.1
Xlib/libmosquitto.so
Xinclude/mosquittopp.h
Xinclude/mosquitto_plugin.h
Xinclude/mosquitto.h
Xbin/mosquitto_sub
Xbin/mosquitto_pub
Xbin/mosquitto_passwd
Xsbin/mosquitto
Xetc/mosquitto/pwfile.example
Xetc/mosquitto/pskfile.example
X at unexec if cmp -s %D/etc/mosquitto/mosquitto.conf %D/etc/mosquitto/mosquitto.conf.sample; then rm -f %D/etc/mosquitto/mosquitto.conf; fi
Xetc/mosquitto/mosquitto.conf.example
X at exec cp -n %B/mosquitto.conf.example %B/mosquitto.conf
Xetc/mosquitto/aclfile.example
X at dirrmtry etc/mosquitto
eec9fc7572767ca43b77952c7e1119c0
echo x - net/mosquitto/pkg-descr
sed 's/^X//' >net/mosquitto/pkg-descr << '7ce7f67547337cd353786fef98c406d8'
XMosquitto is an open source implementation of a server for version 3.1
Xof the MQTT protocol.
X
XWWW: http://mosquitto.org/
7ce7f67547337cd353786fef98c406d8
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list