Add support for the mosquitto MQTT message broker, and client tools and client
library.  (For developing third party apps running on openwrt that communicate
with an MQTT server)

This is the current code directly from the mosquitto-packaging repository:
https://bitbucket.org/oojah/mosquitto-packaging/src applied as an svn patch
into current openwrt trunk.

submitted by: Karl Palsson <k...@ekta.is> on behalf of Karl Palsson
<ka...@tweak.net.au> (bad email clients) on behalf of the mosquitto
developers.

I also offer to maintain the openwrt packaging for mosquitto, at least for the
foreseeable future.

I can be reached at ka...@tweak.net.au or as karlp on irc.freenode.org#mqtt

This has currently been tested on an atheros based board.

Sincerely,
Karl P


Index: package/mosquitto/patches/100-disable-memory-reporting.patch
===================================================================
--- package/mosquitto/patches/100-disable-memory-reporting.patch        
(revision 0)
+++ package/mosquitto/patches/100-disable-memory-reporting.patch        
(revision 0)
@@ -0,0 +1,12 @@
+diff -r 490c907277dc config.h
+--- a/config.h Sat Jan 15 22:23:50 2011 +0000
++++ b/config.h Wed Jan 26 13:37:36 2011 +0000
+@@ -15,7 +15,7 @@
+ /* Compile with memory tracking support? If disabled, mosquitto won't track
+  * heap memory usage nor export '$SYS/broker/heap/current size', but will use
+  * slightly less memory and CPU time. */
+-#define WITH_MEMORY_TRACKING
++//#define WITH_MEMORY_TRACKING
+ 
+ /* Compile with the ability to upgrade from old style sqlite persistent
+  * databases to the new mosquitto format. This means a dependency on sqlite. 
It
Index: package/mosquitto/patches/101-disable-docbook.patch
===================================================================
--- package/mosquitto/patches/101-disable-docbook.patch (revision 0)
+++ package/mosquitto/patches/101-disable-docbook.patch (revision 0)
@@ -0,0 +1,11 @@
+diff -r bebd02e8bed4 -r 77b64fb10075 Makefile
+--- a/Makefile Thu Jul 07 13:34:54 2011 +0100
++++ b/Makefile Thu Jul 07 16:50:05 2011 +0000
+@@ -1,6 +1,6 @@
+ include config.mk
+ 
+-DIRS=lib client src man
++DIRS=lib client src
+ DISTDIRS=man
+ 
+ .PHONY : all mosquitto clean reallyclean install uninstall dist sign copy
Index: package/mosquitto/Makefile
===================================================================
--- package/mosquitto/Makefile  (revision 0)
+++ package/mosquitto/Makefile  (revision 0)
@@ -0,0 +1,88 @@
+#
+# Copyright (C) 2010 Jo-Philipp Wich <x...@subsignal.org>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mosquitto
+PKG_VERSION:=0.11.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://mosquitto.org/files/source/
+PKG_MD5SUM:=b322dcaf56d0d1bf8b5b657ab9aa2f06
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/mosquitto/default
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=mosquitto - an MQTT message broker
+  URL:=http://www.mosquitto.org/
+endef
+
+define Package/mosquitto
+    $(Package/mosquitto/default)
+endef
+
+define Package/mosquitto/description
+ mosquitto is a message broker that supports v3.1 of the MQ Telemetry
+Transport protocol. MQTT provides a lightweight method for
+messaging using a publish/subscribe model.
+endef
+
+define Package/mosquitto-client
+    $(Package/mosquitto/default)
+    TITLE:= mosquitto - client tools
+    DEPENDS:= +libmosquitto
+endef
+
+define Package/mosquitto-client/description
+ Command line client tools for publishing messages to MQTT servers
+and subscribing to topics.
+endef
+
+define Package/libmosquitto
+    $(Package/mosquitto/default)
+    SECTION:=libs
+    CATEGORY:=Libraries
+    TITLE:= mosquitto - client library
+endef
+
+define Package/libmosquitto/description
+ Library required for mosquitto's command line client tools, also for
+use by any third party software that wants to communicate with a 
+mosquitto server.  
+
+Should be useable for communicating with any MQTT v3.1 compatible 
+server, such as IBM's RSMB, in addition to Mosquitto
+endef
+
+
+define Package/mosquitto/conffiles
+/etc/mosquitto/mosquitto.conf
+endef
+
+define Package/mosquitto/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mosquitto $(1)/usr/sbin/mosquitto
+       $(INSTALL_DIR) $(1)/etc/mosquitto
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/mosquitto.conf 
$(1)/etc/mosquitto/mosquitto.conf
+endef
+
+define Package/mosquitto-client/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/client/mosquitto_pub 
$(1)/usr/bin/mosquitto_pub
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/client/mosquitto_sub 
$(1)/usr/bin/mosquitto_sub
+endef
+
+define Package/libmosquitto/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/libmosquitto.so.0 
$(1)/usr/lib/libmosquitto.so.0
+endef
+$(eval $(call BuildPackage,mosquitto))
+$(eval $(call BuildPackage,libmosquitto))
+$(eval $(call BuildPackage,mosquitto-client))
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to