Bug 189451 - [patch] New port of net/mosquitto version 1.3.1
Summary: [patch] New port of net/mosquitto version 1.3.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-08 01:30 UTC by joe
Modified: 2014-05-25 13:30 UTC (History)
0 users

See Also:


Attachments
file.shar (12.33 KB, text/plain)
2014-05-08 01:30 UTC, joe
no flags Details
mosquitto.shar.txt (12.48 KB, text/plain)
2014-05-08 19:53 UTC, joe
no flags Details
mosquitto-cleaned.shar.txt (12.47 KB, text/plain)
2014-05-10 18:26 UTC, joe
no flags Details
mosquitto-compressman.shar.txt (13.06 KB, text/plain)
2014-05-11 20:13 UTC, joe
no flags Details
mosquitto-cmake.shar.txt (8.57 KB, text/plain)
2014-05-17 02:06 UTC, joe
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description joe 2014-05-08 01:30:00 UTC
This is a new port of Mosquitto MQTT Broker.

(warning: first time I've created a port from scratch. I maintain many ports though.)

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-05-08 01:30:05 UTC
Responsible Changed
From-To: freebsd-ports-bugs->swills

swills@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 joe 2014-05-08 19:53:57 UTC
Please use this attached shar file. It cleans up leftover files and
properly removes an unmodified configuration file.

-Joseph Benden
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-05-25 13:20:57 UTC
Author: swills
Date: Sun May 25 12:20:49 2014
New Revision: 355160
URL: http://svnweb.freebsd.org/changeset/ports/355160
QAT: https://qat.redports.org/buildarchive/r355160/

Log:
  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>

Added:
  head/net/mosquitto/
  head/net/mosquitto/Makefile   (contents, props changed)
  head/net/mosquitto/distinfo   (contents, props changed)
  head/net/mosquitto/files/
  head/net/mosquitto/files/mosquitto.in   (contents, props changed)
  head/net/mosquitto/files/patch-CMakeList.txt   (contents, props changed)
  head/net/mosquitto/files/patch-config.mk   (contents, props changed)
  head/net/mosquitto/files/patch-etc-mosquitto.conf.example   (contents, props changed)
  head/net/mosquitto/files/patch-lib-tls_mosq.h   (contents, props changed)
  head/net/mosquitto/files/patch-src-CMakeList.txt   (contents, props changed)
  head/net/mosquitto/pkg-descr   (contents, props changed)
  head/net/mosquitto/pkg-plist   (contents, props changed)
Modified:
  head/net/Makefile

Modified: head/net/Makefile
==============================================================================
--- head/net/Makefile	Sun May 25 11:37:28 2014	(r355159)
+++ head/net/Makefile	Sun May 25 12:20:49 2014	(r355160)
@@ -378,6 +378,7 @@
     SUBDIR += mopd
     SUBDIR += morebalance
     SUBDIR += mosh
+    SUBDIR += mosquitto
     SUBDIR += mpd-l2tp-ipv6pd-client
     SUBDIR += mpd5
     SUBDIR += mpich

Added: head/net/mosquitto/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mosquitto/Makefile	Sun May 25 12:20:49 2014	(r355160)
@@ -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>

Added: head/net/mosquitto/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mosquitto/distinfo	Sun May 25 12:20:49 2014	(r355160)
@@ -0,0 +1,2 @@
+SHA256 (mosquitto-1.3.1.tar.gz) = 1ee649cb80e0bd0aed8476349aa4c15c667507e2fc69540f18e3a1c599ed85fd
+SIZE (mosquitto-1.3.1.tar.gz) = 350381

Added: head/net/mosquitto/files/mosquitto.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mosquitto/files/mosquitto.in	Sun May 25 12:20:49 2014	(r355160)
@@ -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"

Added: head/net/mosquitto/files/patch-CMakeList.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mosquitto/files/patch-CMakeList.txt	Sun May 25 12:20:49 2014	(r355160)
@@ -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})

Added: head/net/mosquitto/files/patch-config.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mosquitto/files/patch-config.mk	Sun May 25 12:20:49 2014	(r355160)
@@ -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

Added: head/net/mosquitto/files/patch-etc-mosquitto.conf.example
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mosquitto/files/patch-etc-mosquitto.conf.example	Sun May 25 12:20:49 2014	(r355160)
@@ -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.

Added: head/net/mosquitto/files/patch-lib-tls_mosq.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mosquitto/files/patch-lib-tls_mosq.h	Sun May 25 12:20:49 2014	(r355160)
@@ -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

Added: head/net/mosquitto/files/patch-src-CMakeList.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mosquitto/files/patch-src-CMakeList.txt	Sun May 25 12:20:49 2014	(r355160)
@@ -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)
+ 

Added: head/net/mosquitto/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mosquitto/pkg-descr	Sun May 25 12:20:49 2014	(r355160)
@@ -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/

Added: head/net/mosquitto/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mosquitto/pkg-plist	Sun May 25 12:20:49 2014	(r355160)
@@ -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%%
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Steve Wills freebsd_committer freebsd_triage 2014-05-25 13:21:37 UTC
State Changed
From-To: open->closed

New port added, with minor changes. Thanks!