Browse Source

- dropbear: rework build

master
vanhofen 3 years ago
parent
commit
e63dda3acc
  1. 23
      package/dropbear/dropbear.mk

23
package/dropbear/dropbear.mk

@ -9,9 +9,6 @@ DROPBEAR_DIR = dropbear-$(DROPBEAR_VERSION)
DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2 DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2
DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases
$(DL_DIR)/$(DROPBEAR_SOURCE):
$(download) $(DROPBEAR_SITE)/$(DROPBEAR_SOURCE)
DROPBEAR_DEPENDENCIES = zlib DROPBEAR_DEPENDENCIES = zlib
DROPBEAR_CONF_OPTS = \ DROPBEAR_CONF_OPTS = \
@ -26,10 +23,16 @@ DROPBEAR_CONF_OPTS = \
DROPBEAR_MAKE_OPTS = \ DROPBEAR_MAKE_OPTS = \
PROGRAMS="dropbear dbclient dropbearkey scp" PROGRAMS="dropbear dbclient dropbearkey scp"
dropbear: $(DROPBEAR_DEPENDENCIES) $(DL_DIR)/$(DROPBEAR_SOURCE) | $(TARGET_DIR) define DROPBEAR_INSTALL_INIT_SCRIPT
$(REMOVE)/$(PKG_DIR) $(INSTALL) -d $(TARGET_sysconfdir)/dropbear
$(UNTAR)/$(PKG_SOURCE) $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/dropbear.init $(TARGET_sysconfdir)/init.d/dropbear
$(CHDIR)/$(PKG_DIR); \ $(UPDATE-RC.D) dropbear defaults 75 25
endef
DROPBEAR_TARGET_FINALIZE_HOOKS += DROPBEAR_INSTALL_INIT_SCRIPT
dropbear: | $(TARGET_DIR)
$(call PREPARE)
$(CHDIR)/$($(PKG)_DIR); \
$(CONFIGURE); \ $(CONFIGURE); \
# Ensure that dropbear doesn't use crypt() when it's not available; \ # Ensure that dropbear doesn't use crypt() when it's not available; \
echo '#if !HAVE_CRYPT' >> localoptions.h; \ echo '#if !HAVE_CRYPT' >> localoptions.h; \
@ -41,8 +44,4 @@ dropbear: $(DROPBEAR_DEPENDENCIES) $(DL_DIR)/$(DROPBEAR_SOURCE) | $(TARGET_DIR)
echo '#define DEFAULT_PATH "/sbin:/bin:/usr/sbin:/usr/bin:/var/bin"' >> localoptions.h; \ echo '#define DEFAULT_PATH "/sbin:/bin:/usr/sbin:/usr/bin:/var/bin"' >> localoptions.h; \
$(MAKE) $($(PKG)_MAKE_OPTS) SCPPROGRESS=1; \ $(MAKE) $($(PKG)_MAKE_OPTS) SCPPROGRESS=1; \
$(MAKE) $($(PKG)_MAKE_OPTS) install DESTDIR=$(TARGET_DIR) $(MAKE) $($(PKG)_MAKE_OPTS) install DESTDIR=$(TARGET_DIR)
$(INSTALL) -d $(TARGET_sysconfdir)/dropbear $(call TARGET_FOLLOWUP)
$(INSTALL_EXEC) -D $(PKG_FILES_DIR)/dropbear.init $(TARGET_sysconfdir)/init.d/dropbear
$(UPDATE-RC.D) dropbear defaults 75 25
$(REMOVE)/$(PKG_DIR)
$(TOUCH)

Loading…
Cancel
Save