dropbear: allow build without dbclient
authorRosy Song <rosysong@rosinson.com>
Thu, 18 Apr 2019 02:20:19 +0000 (10:20 +0800)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 18 Apr 2019 20:34:19 +0000 (22:34 +0200)
This can save ~16KBytes size for the ipk

Signed-off-by: Rosy Song <rosysong@rosinson.com>
package/network/services/dropbear/Config.in
package/network/services/dropbear/Makefile

index 9106322eeac5816a37e2b6e5dc56dd5e85793553..61a04ec876fb0c0cedaf85e5c01d5a41ebe9184d 100644 (file)
@@ -73,4 +73,8 @@ config DROPBEAR_PUTUTLINE
        help
                Dropbear will use pututline() to write the utmp structure into the utmp file.
 
+config DROPBEAR_DBCLIENT
+       bool "Build dropbear with dbclient"
+       default y
+
 endmenu
index 22b769f1529a7786cc588e962f60bc107f3f1e9e..63204042f71a250f257ed5cdfb98bffb66a56bd7 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dropbear
 PKG_VERSION:=2019.78
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
@@ -28,7 +28,8 @@ PKG_FIXUP:=autoreconf
 PKG_CONFIG_DEPENDS:= \
        CONFIG_TARGET_INIT_PATH CONFIG_DROPBEAR_ECC CONFIG_DROPBEAR_ECC_FULL \
        CONFIG_DROPBEAR_CURVE25519 CONFIG_DROPBEAR_ZLIB \
-       CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_PUTUTLINE
+       CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_PUTUTLINE \
+       CONFIG_DROPBEAR_DBCLIENT
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -132,7 +133,7 @@ endef
 define Build/Compile
        +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
-               PROGRAMS="dropbear dbclient dropbearkey scp" \
+               PROGRAMS="dropbear $(if $(CONFIG_DROPBEAR_DBCLIENT),dbclient,) dropbearkey scp" \
                MULTI=1 SCPPROGRESS=1
        +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
@@ -143,7 +144,7 @@ define Package/dropbear/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/usr/sbin/dropbear
        $(INSTALL_DIR) $(1)/usr/bin
-       $(LN) ../sbin/dropbear $(1)/usr/bin/dbclient
+       $(if $(CONFIG_DROPBEAR_DBCLIENT),$(LN) ../sbin/dropbear $(1)/usr/bin/dbclient,)
        $(LN) ../sbin/dropbear $(1)/usr/bin/dropbearkey
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_CONF) ./files/dropbear.config $(1)/etc/config/dropbear