mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 14:16:31 +00:00
package/mosquitto: make broker optional
The mosquitto package provides both the MQTT client library and a broker, and the latter may be not needed (when connecting to a remote broker). It should be therefore possible to not install and start it on the target Also remove the dependency on BR2_TOOLCHAIN_HAS_SYNC_4, as it does not seem to be needed. Verified with: * br-m68k-68040-full.config [OK] * br-sparc-uclibc.config [OK] The original issue adding the dependency in commit 874d0784bb23d (package/mosquito: needs sync_4) unfortunately refers to autobuilder results that are no longer available. Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu> [Peter: extend commit message, fix comment line, remove indentation in .mk] Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
ac6480e2b8
commit
4fc62e1eb6
@ -1,7 +1,5 @@
|
|||||||
config BR2_PACKAGE_MOSQUITTO
|
config BR2_PACKAGE_MOSQUITTO
|
||||||
bool "mosquitto"
|
bool "mosquitto"
|
||||||
depends on BR2_USE_MMU # fork()
|
|
||||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
|
||||||
depends on !BR2_STATIC_LIBS # builds .so
|
depends on !BR2_STATIC_LIBS # builds .so
|
||||||
help
|
help
|
||||||
Mosquitto is an open source message broker that implements
|
Mosquitto is an open source message broker that implements
|
||||||
@ -15,6 +13,15 @@ config BR2_PACKAGE_MOSQUITTO
|
|||||||
http://mosquitto.org/
|
http://mosquitto.org/
|
||||||
|
|
||||||
comment "mosquitto needs a toolchain w/ dynamic library"
|
comment "mosquitto needs a toolchain w/ dynamic library"
|
||||||
depends on BR2_USE_MMU
|
|
||||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
|
||||||
depends on BR2_STATIC_LIBS
|
depends on BR2_STATIC_LIBS
|
||||||
|
|
||||||
|
config BR2_PACKAGE_MOSQUITTO_BROKER
|
||||||
|
bool "install the mosquitto broker"
|
||||||
|
default y
|
||||||
|
depends on BR2_USE_MMU # fork()
|
||||||
|
depends on BR2_PACKAGE_MOSQUITTO
|
||||||
|
help
|
||||||
|
Build and install the mosquitto broker onto target.
|
||||||
|
|
||||||
|
comment "mosquitto broker needs a system with MMU"
|
||||||
|
depends on !BR2_USE_MMU
|
||||||
|
@ -67,24 +67,30 @@ endef
|
|||||||
MOSQUITTO_POST_PATCH_HOOKS += MOSQUITTO_DISABLE_CPP
|
MOSQUITTO_POST_PATCH_HOOKS += MOSQUITTO_DISABLE_CPP
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
MOSQUITTO_MAKE_DIRS = lib client
|
||||||
|
ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER),y)
|
||||||
|
MOSQUITTO_MAKE_DIRS += src
|
||||||
|
endif
|
||||||
|
|
||||||
define MOSQUITTO_BUILD_CMDS
|
define MOSQUITTO_BUILD_CMDS
|
||||||
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
|
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DIRS="$(MOSQUITTO_MAKE_DIRS)" \
|
||||||
$(MOSQUITTO_MAKE_OPTS)
|
$(MOSQUITTO_MAKE_OPTS)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define MOSQUITTO_INSTALL_STAGING_CMDS
|
define MOSQUITTO_INSTALL_STAGING_CMDS
|
||||||
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
|
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DIRS="$(MOSQUITTO_MAKE_DIRS)" \
|
||||||
$(MOSQUITTO_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
|
$(MOSQUITTO_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define MOSQUITTO_INSTALL_TARGET_CMDS
|
define MOSQUITTO_INSTALL_TARGET_CMDS
|
||||||
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
|
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DIRS="$(MOSQUITTO_MAKE_DIRS)" \
|
||||||
$(MOSQUITTO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
|
$(MOSQUITTO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
|
||||||
rm -f $(TARGET_DIR)/etc/mosquitto/*.example
|
rm -f $(TARGET_DIR)/etc/mosquitto/*.example
|
||||||
$(INSTALL) -D -m 0644 $(@D)/mosquitto.conf \
|
$(INSTALL) -D -m 0644 $(@D)/mosquitto.conf \
|
||||||
$(TARGET_DIR)/etc/mosquitto/mosquitto.conf
|
$(TARGET_DIR)/etc/mosquitto/mosquitto.conf
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER),y)
|
||||||
define MOSQUITTO_INSTALL_INIT_SYSV
|
define MOSQUITTO_INSTALL_INIT_SYSV
|
||||||
$(INSTALL) -D -m 0755 package/mosquitto/S50mosquitto \
|
$(INSTALL) -D -m 0755 package/mosquitto/S50mosquitto \
|
||||||
$(TARGET_DIR)/etc/init.d/S50mosquitto
|
$(TARGET_DIR)/etc/init.d/S50mosquitto
|
||||||
@ -101,5 +107,6 @@ endef
|
|||||||
define MOSQUITTO_USERS
|
define MOSQUITTO_USERS
|
||||||
mosquitto -1 nogroup -1 * - - - Mosquitto user
|
mosquitto -1 nogroup -1 * - - - Mosquitto user
|
||||||
endef
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
$(eval $(generic-package))
|
$(eval $(generic-package))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user