initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
config BR2_PACKAGE_MOSQUITTO
|
||||
bool "mosquitto"
|
||||
help
|
||||
Eclipse Mosquitto is an open source (EPL/EDL licensed) message
|
||||
broker that implements the MQTT protocol versions 5.0, 3.1.1
|
||||
and 3.1. Mosquitto is lightweight and is suitable for use on
|
||||
all devices from low power single board computers to full
|
||||
servers.
|
||||
|
||||
The MQTT protocol provides a lightweight method of carrying
|
||||
out messaging using a publish/subscribe model. This makes it
|
||||
suitable for Internet of Things messaging such as with low
|
||||
power sensors or mobile devices such as phones,
|
||||
embedded computers or microcontrollers.
|
||||
|
||||
The Mosquitto project also provides a C library for
|
||||
implementing MQTT clients, and the very popular mosquitto_pub
|
||||
and mosquitto_sub command line MQTT clients.
|
||||
|
||||
http://mosquitto.org/
|
||||
|
||||
config BR2_PACKAGE_MOSQUITTO_BROKER
|
||||
bool "install the mosquitto broker"
|
||||
default y
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on !BR2_STATIC_LIBS # include <dlfcn.h>
|
||||
depends on BR2_PACKAGE_MOSQUITTO
|
||||
help
|
||||
Build and install the mosquitto broker onto target.
|
||||
|
||||
comment "mosquitto broker needs a toolchain w/ dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_STATIC_LIBS
|
||||
depends on BR2_PACKAGE_MOSQUITTO
|
||||
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
start() {
|
||||
printf "Starting mosquitto: "
|
||||
start-stop-daemon -S -q -m -b -p /var/run/mosquitto.pid \
|
||||
--exec /usr/sbin/mosquitto \
|
||||
-- -c /etc/mosquitto/mosquitto.conf
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
stop() {
|
||||
printf "Stopping mosquitto: "
|
||||
start-stop-daemon -K -q -p /var/run/mosquitto.pid
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
@@ -0,0 +1,8 @@
|
||||
# Locally calculated after checking gpg signature
|
||||
# from https://mosquitto.org/files/source/mosquitto-2.0.13.tar.gz.asc
|
||||
sha256 d0dde8fdb12caf6e2426b4f28081919a2fce3448773bdb8af0d3cd5fe5776925 mosquitto-2.0.14.tar.gz
|
||||
|
||||
# License files
|
||||
sha256 d3c4ccace4e5d3cc89d34cf2a0bc85b8596bfc0a32b815d0d77f9b7c41b5350c LICENSE.txt
|
||||
sha256 8c349f80764d0648e645f41ef23772a70c995a0924b5235f735f4a3d09df127c epl-v20
|
||||
sha256 86fc4a3f97cb769c04e8da557036c1066eb8bb22b2d0a5dd31464990fe84047c edl-v10
|
||||
@@ -0,0 +1,131 @@
|
||||
################################################################################
|
||||
#
|
||||
# mosquitto
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MOSQUITTO_VERSION = 2.0.14
|
||||
MOSQUITTO_SITE = https://mosquitto.org/files/source
|
||||
MOSQUITTO_LICENSE = EPL-2.0 or EDLv1.0
|
||||
MOSQUITTO_LICENSE_FILES = LICENSE.txt epl-v20 edl-v10
|
||||
MOSQUITTO_CPE_ID_VENDOR = eclipse
|
||||
MOSQUITTO_INSTALL_STAGING = YES
|
||||
|
||||
MOSQUITTO_MAKE_OPTS = \
|
||||
CLIENT_STATIC_LDADD="$(MOSQUITTO_STATIC_LIBS)" \
|
||||
UNAME=Linux \
|
||||
STRIP=true \
|
||||
prefix=/usr \
|
||||
WITH_WRAP=no \
|
||||
WITH_DOCS=no
|
||||
|
||||
ifeq ($(BR2_SHARED_LIBS),y)
|
||||
MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no
|
||||
else
|
||||
MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=yes
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
MOSQUITTO_MAKE_OPTS += WITH_SHARED_LIBRARIES=no
|
||||
else
|
||||
MOSQUITTO_MAKE_OPTS += WITH_SHARED_LIBRARIES=yes
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
MOSQUITTO_MAKE_OPTS += WITH_SYSTEMD=yes
|
||||
MOSQUITTO_DEPENDENCIES += systemd
|
||||
endif
|
||||
|
||||
# adns uses getaddrinfo_a
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
|
||||
MOSQUITTO_MAKE_OPTS += WITH_ADNS=yes
|
||||
else
|
||||
MOSQUITTO_MAKE_OPTS += WITH_ADNS=no
|
||||
endif
|
||||
|
||||
# threaded API uses pthread_setname_np
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
|
||||
MOSQUITTO_MAKE_OPTS += WITH_THREADING=yes
|
||||
else
|
||||
MOSQUITTO_MAKE_OPTS += WITH_THREADING=no
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
MOSQUITTO_DEPENDENCIES += host-pkgconf openssl
|
||||
MOSQUITTO_MAKE_OPTS += WITH_TLS=yes
|
||||
MOSQUITTO_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs openssl`
|
||||
else
|
||||
MOSQUITTO_MAKE_OPTS += WITH_TLS=no
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_CJSON),y)
|
||||
MOSQUITTO_DEPENDENCIES += cjson
|
||||
MOSQUITTO_MAKE_OPTS += WITH_CJSON=yes
|
||||
MOSQUITTO_STATIC_LIBS += -lcjson
|
||||
else
|
||||
MOSQUITTO_MAKE_OPTS += WITH_CJSON=no
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_C_ARES),y)
|
||||
MOSQUITTO_DEPENDENCIES += c-ares
|
||||
MOSQUITTO_MAKE_OPTS += WITH_SRV=yes
|
||||
else
|
||||
MOSQUITTO_MAKE_OPTS += WITH_SRV=no
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS),y)
|
||||
MOSQUITTO_DEPENDENCIES += libwebsockets
|
||||
MOSQUITTO_MAKE_OPTS += WITH_WEBSOCKETS=yes
|
||||
else
|
||||
MOSQUITTO_MAKE_OPTS += WITH_WEBSOCKETS=no
|
||||
endif
|
||||
|
||||
# C++ support is only used to create a wrapper library
|
||||
ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
|
||||
define MOSQUITTO_DISABLE_CPP
|
||||
$(SED) '/-C cpp/d' $(@D)/lib/Makefile
|
||||
endef
|
||||
|
||||
MOSQUITTO_POST_PATCH_HOOKS += MOSQUITTO_DISABLE_CPP
|
||||
endif
|
||||
|
||||
MOSQUITTO_MAKE_DIRS = lib client
|
||||
ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER),y)
|
||||
MOSQUITTO_MAKE_DIRS += src
|
||||
endif
|
||||
|
||||
define MOSQUITTO_BUILD_CMDS
|
||||
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DIRS="$(MOSQUITTO_MAKE_DIRS)" \
|
||||
$(MOSQUITTO_MAKE_OPTS)
|
||||
endef
|
||||
|
||||
define MOSQUITTO_INSTALL_STAGING_CMDS
|
||||
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DIRS="$(MOSQUITTO_MAKE_DIRS)" \
|
||||
$(MOSQUITTO_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
|
||||
endef
|
||||
|
||||
define MOSQUITTO_INSTALL_TARGET_CMDS
|
||||
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DIRS="$(MOSQUITTO_MAKE_DIRS)" \
|
||||
$(MOSQUITTO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
|
||||
rm -f $(TARGET_DIR)/etc/mosquitto/*.example
|
||||
$(INSTALL) -D -m 0644 $(@D)/mosquitto.conf \
|
||||
$(TARGET_DIR)/etc/mosquitto/mosquitto.conf
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER),y)
|
||||
define MOSQUITTO_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/mosquitto/S50mosquitto \
|
||||
$(TARGET_DIR)/etc/init.d/S50mosquitto
|
||||
endef
|
||||
|
||||
define MOSQUITTO_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 $(@D)/service/systemd/mosquitto.service.notify \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/mosquitto.service
|
||||
endef
|
||||
|
||||
define MOSQUITTO_USERS
|
||||
mosquitto -1 nobody -1 * - - - Mosquitto user
|
||||
endef
|
||||
endif
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user