* [ptxdist] [PATCH] mosquitto: Add new package
@ 2017-11-01 14:34 Alexander Dahl
0 siblings, 0 replies; only message in thread
From: Alexander Dahl @ 2017-11-01 14:34 UTC (permalink / raw)
To: ptxdist
This adds basic support for the mosquitto package from
https://mosquitto.org/ – a MQTT message broker, library, and two simple
publisher/subscriber clients.
The package so far does the build, you can use the C/C++ libraries, and
clients and broker binary can be installed to the target. There's no
additional stuff like init script or systemd service file for the broker
yet.
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
rules/mosquitto.in | 36 +++++++++++++++++++++
rules/mosquitto.make | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 124 insertions(+)
create mode 100644 rules/mosquitto.in
create mode 100644 rules/mosquitto.make
diff --git a/rules/mosquitto.in b/rules/mosquitto.in
new file mode 100644
index 0000000000..d7eb813c17
--- /dev/null
+++ b/rules/mosquitto.in
@@ -0,0 +1,36 @@
+## SECTION=networking
+
+menuconfig MOSQUITTO
+ tristate
+ prompt "mosquitto "
+ select OPENSSL if MOSQUITTO_TLS
+ select C_ARES if MOSQUITTO_SRV
+ select LIBUUID if MOSQUITTO_UUID
+ help
+ Open source MQTT message broker, library, and client.
+
+if MOSQUITTO
+
+config MOSQUITTO_BROKER
+ bool
+ prompt "Broker"
+
+config MOSQUITTO_CLIENTS
+ bool
+ prompt "Clients"
+
+config MOSQUITTO_TLS
+ bool
+ prompt "TLS support"
+
+config MOSQUITTO_SRV
+ bool
+ prompt "SRV lookup support"
+
+config MOSQUITTO_UUID
+ bool
+ prompt "UUID as client id"
+
+endif
+
+# vim: ft=kconfig noet tw=72
diff --git a/rules/mosquitto.make b/rules/mosquitto.make
new file mode 100644
index 0000000000..4372fc0a04
--- /dev/null
+++ b/rules/mosquitto.make
@@ -0,0 +1,88 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Alexander Dahl <ada@thorsis.com>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_MOSQUITTO) += mosquitto
+
+#
+# Paths and names
+#
+MOSQUITTO_VERSION := 1.4.14
+MOSQUITTO_MD5 := 6b0966e93f118bc71ad7b61600a6c2d3
+MOSQUITTO := mosquitto-$(MOSQUITTO_VERSION)
+MOSQUITTO_SUFFIX := tar.gz
+MOSQUITTO_URL := https://mosquitto.org/files/source/$(MOSQUITTO).$(MOSQUITTO_SUFFIX)
+MOSQUITTO_SOURCE := $(SRCDIR)/$(MOSQUITTO).$(MOSQUITTO_SUFFIX)
+MOSQUITTO_DIR := $(BUILDDIR)/$(MOSQUITTO)
+# "Eclipse Distribution License - v 1.0" is in fact BSD-3-Clause
+MOSQUITTO_LICENSE := EPL-1.0 AND BSD-3-Clause
+MOSQUITTO_LICENSE_FILES := file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \
+ file://edl-v10;md5=c09f121939f063aeb5235972be8c722c
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+MOSQUITTO_CONF_TOOL := NO
+MOSQUITTO_MAKE_ENV := $(CROSS_ENV)
+MOSQUITTO_MAKE_OPT := \
+ UNAME=Linux \
+ prefix=/usr \
+ WITH_WRAP=no \
+ WITH_TLS=$(call ptx/ifdef, PTXCONF_MOSQUITTO_TLS, yes, no) \
+ WITH_TLS_PSK=$(call ptx/ifdef, PTXCONF_MOSQUITTO_TLS, yes, no) \
+ WITH_THREADING=yes \
+ WITH_BRIDGE=yes \
+ WITH_PERSISTENCE=yes \
+ WITH_MEMORY_TRACKING=yes \
+ WITH_SYS_TREE=yes \
+ WITH_SRV=$(call ptx/ifdef, PTXCONF_MOSQUITTO_SRV, yes, no) \
+ WITH_UUID=$(call ptx/ifdef, PTXCONF_MOSQUITTO_UUID, yes, no) \
+ WITH_WEBSOCKETS=no \
+ WITH_EC=yes \
+ WITH_DOCS=no \
+ WITH_SOCKS=yes \
+ WITH_ADNS=no
+MOSQUITTO_INSTALL_OPT := \
+ $(MOSQUITTO_MAKE_OPT) \
+ install
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/mosquitto.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, mosquitto)
+ @$(call install_fixup, mosquitto,PRIORITY,optional)
+ @$(call install_fixup, mosquitto,SECTION,base)
+ @$(call install_fixup, mosquitto,AUTHOR,"Alexander Dahl <ada@thorsis.com>")
+ @$(call install_fixup, mosquitto,DESCRIPTION,missing)
+
+ @$(call install_lib, mosquitto, 0, 0, 0644, libmosquitto)
+ @$(call install_lib, mosquitto, 0, 0, 0644, libmosquittopp)
+
+ifdef PTXCONF_MOSQUITTO_CLIENTS
+ @$(call install_copy, mosquitto, 0, 0, 0755, -, /usr/bin/mosquitto_pub)
+ @$(call install_copy, mosquitto, 0, 0, 0755, -, /usr/bin/mosquitto_sub)
+endif
+
+ifdef PTXCONF_MOSQUITTO_BROKER
+ @$(call install_copy, mosquitto, 0, 0, 0755, -, /usr/sbin/mosquitto)
+endif
+
+ @$(call install_finish, mosquitto)
+
+ @$(call touch)
+
+# vim: ft=make noet ts=8 sw=8
--
2.11.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-01 14:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01 14:34 [ptxdist] [PATCH] mosquitto: Add new package Alexander Dahl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox