mosquitto: properly separate the passwd utility
authorKarl Palsson <karlp@remake.is>
Mon, 18 Jan 2016 17:40:52 +0000 (17:40 +0000)
committerKarl Palsson <karlp@remake.is>
Tue, 19 Jan 2016 12:05:48 +0000 (12:05 +0000)
Building both variants improperly tried to include the passwd utility
for the non-ssl variant, as the variable was set for the ssl variant.

Use properly separated install tasks to install additional files, rather
than hacking around inside the single target.

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

index 495ad143371347e2384bbedc2c590c6023d24a68..ec588d184e3df32c2bedcd8b0f15b95e7097129d 100644 (file)
@@ -145,12 +145,9 @@ endef
 
 Package/$(PKG_NAME)-nossl/conffiles = $(Package/$(PKG_NAME)/conffiles)
 
-define Package/$(PKG_NAME)/install
+define Package/mosquitto/install/default
        $(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
@@ -158,8 +155,18 @@ endif
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) ./files/mosquitto.uci.convert $(1)/usr/bin
 endef
-Package/$(PKG_NAME)-nossl/install = $(Package/$(PKG_NAME)/install)
 
+define Package/mosquitto-nossl/install
+       $(call Package/mosquitto/install/default,$(1))
+endef
+
+define Package/mosquitto/install
+       $(call Package/mosquitto/install/default,$(1))
+ifeq ($(CONFIG_MOSQUITTO_PASSWD),y)
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mosquitto_passwd $(1)/usr/bin
+endif
+endef
 
 define Package/mosquitto-client/install
        $(INSTALL_DIR) $(1)/usr/bin