added my Recipes
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1571]
|
||||
From 3fe5468f1bdca1bff1d18cf43c9e338f41aa9e32 Mon Sep 17 00:00:00 2001
|
||||
From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
|
||||
Date: Wed, 22 Jan 2020 12:39:49 +0100
|
||||
Subject: [PATCH] Add dynamic symbols linking with cmake too
|
||||
|
||||
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
|
||||
---
|
||||
lib/CMakeLists.txt | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/lib/CMakeLists.txt
|
||||
+++ b/lib/CMakeLists.txt
|
||||
@@ -94,6 +94,8 @@
|
||||
OUTPUT_NAME mosquitto
|
||||
VERSION ${VERSION}
|
||||
SOVERSION 1
|
||||
+ LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linker.version
|
||||
+ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/linker.version"
|
||||
)
|
||||
|
||||
install(TARGETS libmosquitto
|
||||
@@ -0,0 +1,89 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Based on the Debian initscript for mosquitto
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: mosquitto
|
||||
# Required-Start: $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: mosquitto MQTT message broker
|
||||
# Description:
|
||||
# This is a message broker that supports version 3.1/3.1.1 of the MQ Telemetry
|
||||
# Transport (MQTT) protocol.
|
||||
#
|
||||
# MQTT provides a method of carrying out messaging using a publish/subscribe
|
||||
# model. It is lightweight, both in terms of bandwidth usage and ease of
|
||||
# implementation. This makes it particularly useful at the edge of the network
|
||||
# where a sensor or other simple device may be implemented using an arduino for
|
||||
# example.
|
||||
### END INIT INFO
|
||||
|
||||
set -e
|
||||
|
||||
PIDFILE=@LOCALSTATEDIR@/run/mosquitto.pid
|
||||
DAEMON=@SBINDIR@/mosquitto
|
||||
|
||||
# start and stop the mosquitto MQTT message broker
|
||||
|
||||
test -x ${DAEMON} || exit 0
|
||||
|
||||
umask 022
|
||||
|
||||
. @SYSCONFDIR@/init.d/functions
|
||||
|
||||
export PATH="${PATH:+$PATH:}@SBINDIR@:@BASE_SBINDIR@"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting Mosquitto message broker" "mosquitto"
|
||||
if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c @SYSCONFDIR@/mosquitto/mosquitto.conf ; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping Mosquitto message broker" "mosquitto"
|
||||
if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE}; then
|
||||
rm -f ${PIDFILE}
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
reload|force-reload)
|
||||
if [ -f ${PIDFILE} ] ; then
|
||||
echo "Reloading configuration for mosquitto"
|
||||
pid=`cat ${PIDFILE}`
|
||||
kill -HUP $pid
|
||||
else
|
||||
echo "mosquitto does not seem to be running"
|
||||
fi
|
||||
;;
|
||||
|
||||
restart)
|
||||
echo "Restarting Mosquitto message broker" "mosquitto"
|
||||
if start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${PIDFILE}; then
|
||||
rm -f ${PIDFILE}
|
||||
fi
|
||||
if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c @SYSCONFDIR@/mosquitto/mosquitto.conf ; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
status)
|
||||
status ${DAEMON} && exit 0 || exit $?
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|reload|force-reload|restart|status}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,90 @@
|
||||
SUMMARY = "Open source MQTT implementation"
|
||||
DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker \
|
||||
that implements the MQ Telemetry Transport protocol version 3.1, 3.1.1 and \
|
||||
5, providing both an MQTT broker and several command-line clients. MQTT \
|
||||
provides a lightweight method of carrying out messaging using a \
|
||||
publish/subscribe model. "
|
||||
HOMEPAGE = "http://mosquitto.org/"
|
||||
SECTION = "console/network"
|
||||
LICENSE = "EPL-2.0 | EDL-1.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ca9a8f366c6babf593e374d0d7d58749 \
|
||||
file://edl-v10;md5=9f6accb1afcb570f8be65039e2fcd49e \
|
||||
file://epl-v20;md5=2dd765ca47a05140be15ebafddbeadfe \
|
||||
file://NOTICE.md;md5=a7a91b4754c6f7995020d1b49bc829c6 \
|
||||
"
|
||||
DEPENDS = "uthash cjson"
|
||||
|
||||
SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \
|
||||
file://mosquitto.init \
|
||||
file://1571.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "4735b1d32e3f91c7a8896741d88a3022e89730a1ee897946decfa0df27039ac6"
|
||||
|
||||
inherit systemd update-rc.d useradd cmake pkgconfig
|
||||
|
||||
PACKAGECONFIG ??= "ssl dlt websockets \
|
||||
${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \
|
||||
"
|
||||
|
||||
PACKAGECONFIG[manpages] = "-DDOCUMENTATION=ON,-DDOCUMENTATION=OFF,libxslt-native docbook-xsl-stylesheets-native"
|
||||
PACKAGECONFIG[dns-srv] = "-DWITH_SRV=ON,-DWITH_SRV=OFF,c-ares"
|
||||
PACKAGECONFIG[ssl] = "-DWITH_TLS=ON -DWITH_TLS_PSK=ON -DWITH_EC=ON,-DWITH_TLS=OFF -DWITH_TLS_PSK=OFF -DWITH_EC=OFF,openssl"
|
||||
PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd"
|
||||
PACKAGECONFIG[websockets] = "-DWITH_WEBSOCKETS=ON,-DWITH_WEBSOCKETS=OFF,libwebsockets"
|
||||
PACKAGECONFIG[dlt] = "-DWITH_DLT=ON,-DWITH_DLT=OFF,dlt-daemon"
|
||||
|
||||
EXTRA_OECMAKE = " \
|
||||
-DWITH_BUNDLED_DEPS=OFF \
|
||||
-DWITH_ADNS=ON \
|
||||
"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${systemd_unitdir}/system/
|
||||
install -m 0644 ${S}/service/systemd/mosquitto.service.notify ${D}${systemd_unitdir}/system/mosquitto.service
|
||||
|
||||
install -d ${D}${sysconfdir}/init.d/
|
||||
install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto
|
||||
sed -i -e 's,@SBINDIR@,${sbindir},g' \
|
||||
-e 's,@BASE_SBINDIR@,${base_sbindir},g' \
|
||||
-e 's,@LOCALSTATEDIR@,${localstatedir},g' \
|
||||
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
|
||||
${D}${sysconfdir}/init.d/mosquitto
|
||||
}
|
||||
|
||||
PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients"
|
||||
|
||||
PACKAGE_BEFORE_PN = "${PN}-examples"
|
||||
|
||||
FILES:${PN} = "${sbindir}/mosquitto \
|
||||
${bindir}/mosquitto_passwd \
|
||||
${bindir}/mosquitto_ctrl \
|
||||
${libdir}/mosquitto_dynamic_security.so \
|
||||
${sysconfdir}/mosquitto \
|
||||
${sysconfdir}/init.d \
|
||||
${systemd_unitdir}/system/mosquitto.service \
|
||||
"
|
||||
|
||||
CONFFILES:${PN} += "${sysconfdir}/mosquitto/mosquitto.conf"
|
||||
|
||||
FILES:libmosquitto1 = "${libdir}/libmosquitto.so.*"
|
||||
|
||||
FILES:libmosquittopp1 = "${libdir}/libmosquittopp.so.*"
|
||||
|
||||
FILES:${PN}-clients = "${bindir}/mosquitto_pub \
|
||||
${bindir}/mosquitto_sub \
|
||||
${bindir}/mosquitto_rr \
|
||||
"
|
||||
|
||||
FILES:${PN}-examples = "${sysconfdir}/mosquitto/*.example"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "mosquitto.service"
|
||||
|
||||
INITSCRIPT_NAME = "mosquitto"
|
||||
INITSCRIPT_PARAMS = "defaults 30"
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false \
|
||||
--user-group mosquitto"
|
||||
|
||||
BBCLASSEXTEND += "native nativesdk"
|
||||
Reference in New Issue
Block a user