mosquitto: optionally include mosquitto_passwd utility
authorKarl Palsson <karlp@remake.is>
Fri, 15 Jan 2016 09:29:41 +0000 (09:29 +0000)
committerKarl Palsson <karlp@remake.is>
Fri, 15 Jan 2016 09:32:08 +0000 (09:32 +0000)
Many users of the SSL build of mosquitto need the passwd utility for
managing keys.

Fixes github issue #1909

Signed-off-by: Karl Palsson <karlp@remake.is>
net/mosquitto/Config.in
net/mosquitto/Makefile

index 9fe48ce3b50eda967617ac18894e807db3d3ab32..9b169c58e765224dcdf3928123d93181a2475bdc 100644 (file)
@@ -4,3 +4,10 @@ config MOSQUITTO_LWS
     default y
     help
         Includes websockets support in the broker, via libwebsockets
+
+config MOSQUITTO_PASSWD
+    bool "Include mosquitto_passwd utility"
+    depends on PACKAGE_mosquitto
+    default y
+    help
+        mosquitto_passwd is a tool for managing password files for mosquitto.
index 87ff529e8e11663cc746d72d23928f9115ab611d..07d506afa39b32bee605d509daaa72d7aa96394e 100644 (file)
@@ -148,6 +148,9 @@ Package/$(PKG_NAME)-nossl/conffiles = $(Package/$(PKG_NAME)/conffiles)
 define Package/$(PKG_NAME)/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mosquitto $(1)/usr/sbin/mosquitto
+ifeq ($(CONFIG_MOSQUITTO_PASSWD),y)
+        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mosquitto_passwd $(1)/usr/sbin
+endif
        $(INSTALL_DIR) $(1)/etc/mosquitto
        $(INSTALL_CONF) $(PKG_BUILD_DIR)/mosquitto.conf $(1)/etc/mosquitto/mosquitto.conf
        $(INSTALL_DIR) $(1)/etc/init.d