Makefile 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. #
  2. # Copyright (C) 2006-2020 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=dropbear
  9. PKG_VERSION:=2025.88
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:= \
  13. https://matt.ucc.asn.au/dropbear/releases/ \
  14. https://dropbear.nl/mirror/releases/
  15. PKG_HASH:=783f50ea27b17c16da89578fafdb6decfa44bb8f6590e5698a4e4d3672dc53d4
  16. PKG_LICENSE:=MIT
  17. PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE
  18. PKG_CPE_ID:=cpe:/a:dropbear_ssh_project:dropbear_ssh
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_ASLR_PIE_REGULAR:=1
  21. PKG_BUILD_FLAGS:=no-mips16 gc-sections lto
  22. PKG_FIXUP:=autoreconf
  23. PKG_FLAGS:=nonshared
  24. PKG_CONFIG_DEPENDS:= \
  25. CONFIG_DROPBEAR_STATIC_BUILD CONFIG_DROPBEAR_LEGACY_COMPAT CONFIG_DROPBEAR_SMALL_CODE CONFIG_DROPBEAR_DEBUG_TRACE CONFIG_DROPBEAR_LOG_COMMANDS CONFIG_DROPBEAR_INETD_MODE \
  26. CONFIG_DROPBEAR_DO_HOST_LOOKUP CONFIG_DROPBEAR_SVR_PUBKEY_OPTIONS CONFIG_DROPBEAR_LASTLOG CONFIG_DROPBEAR_LASTLOG_PATH CONFIG_DROPBEAR_WTMP CONFIG_DROPBEAR_WTMP_PATH CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_UTMP_PATH CONFIG_DROPBEAR_PUTUTLINE CONFIG_DROPBEAR_LOGINFUNC \
  27. CONFIG_DROPBEAR_REEXEC CONFIG_DROPBEAR_ZLIB CONFIG_DROPBEAR_DELAY_HOSTKEY CONFIG_DROPBEAR_SVR_AGENTFWD CONFIG_DROPBEAR_SVR_REMOTETCPFWD CONFIG_DROPBEAR_SVR_LOCALTCPFWD CONFIG_DROPBEAR_SVR_LOCALSTREAMFWD CONFIG_DROPBEAR_X11FWD CONFIG_DROPBEAR_SCP CONFIG_DROPBEAR_SFTPSERVER \
  28. CONFIG_DROPBEAR_DBCLIENT CONFIG_DROPBEAR_USER_ALGO_LIST CONFIG_DROPBEAR_USE_SSH_CONFIG CONFIG_DROPBEAR_CLI_IMMEDIATE_AUTH CONFIG_DROPBEAR_USE_PASSWORD_ENV CONFIG_DROPBEAR_CLI_ASKPASS_HELPER CONFIG_DROPBEAR_CLI_AGENTFWD CONFIG_DROPBEAR_CLI_LOCALTCPFWD CONFIG_DROPBEAR_CLI_REMOTETCPFWD CONFIG_DROPBEAR_CLI_PROXYCMD CONFIG_DROPBEAR_CLI_NETCAT CONFIG_DROPBEAR_CLI_MULTIHOP \
  29. CONFIG_DROPBEAR_KEX_REKEY_TIMEOUT CONFIG_DROPBEAR_KEX_REKEY_DATA CONFIG_DROPBEAR_AUTH_TIMEOUT CONFIG_DROPBEAR_MAX_AUTH_TRIES CONFIG_DROPBEAR_UNAUTH_CLOSE_DELAY CONFIG_DROPBEAR_MAX_UNAUTH_PER_IP CONFIG_DROPBEAR_MAX_UNAUTH_CLIENTS CONFIG_DROPBEAR_DEFAULT_RECV_WINDOW CONFIG_DROPBEAR_DEFAULT_KEEPALIVE CONFIG_DROPBEAR_DEFAULT_KEEPALIVE_LIMIT CONFIG_DROPBEAR_DEFAULT_IDLE_TIMEOUT \
  30. CONFIG_DROPBEAR_3DES CONFIG_DROPBEAR_AES128 CONFIG_DROPBEAR_AES256 CONFIG_DROPBEAR_CHACHA20POLY1305 \
  31. CONFIG_DROPBEAR_ENABLE_CTR_MODE CONFIG_DROPBEAR_ENABLE_CBC_MODE CONFIG_DROPBEAR_ENABLE_GCM_MODE \
  32. CONFIG_DROPBEAR_SHA1_96_HMAC CONFIG_DROPBEAR_SHA1_HMAC CONFIG_DROPBEAR_SHA2_256_HMAC CONFIG_DROPBEAR_SHA2_512_HMAC \
  33. CONFIG_DROPBEAR_DSS CONFIG_DROPBEAR_RSA_SHA1 CONFIG_DROPBEAR_RSA CONFIG_DROPBEAR_DEFAULT_RSA_SIZE CONFIG_DROPBEAR_ECDSA CONFIG_DROPBEAR_ED25519 \
  34. CONFIG_DROPBEAR_DH_GROUP1 CONFIG_DROPBEAR_DH_GROUP1_CLIENTONLY CONFIG_DROPBEAR_DH_GROUP14_SHA1 CONFIG_DROPBEAR_DH_GROUP14_SHA256 CONFIG_DROPBEAR_DH_GROUP16 CONFIG_DROPBEAR_ECDH CONFIG_DROPBEAR_CURVE25519 CONFIG_DROPBEAR_MLKEM768 CONFIG_DROPBEAR_SNTRUP761 \
  35. CONFIG_DROPBEAR_ECC_256 CONFIG_DROPBEAR_ECC_384 CONFIG_DROPBEAR_ECC_521 \
  36. CONFIG_DROPBEAR_SK_KEYS CONFIG_DROPBEAR_SK_ECDSA CONFIG_DROPBEAR_SK_ED25519 \
  37. include $(INCLUDE_DIR)/package.mk
  38. ifneq ($(DUMP),1)
  39. STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | $(MKHASH) md5)
  40. endif
  41. define Package/dropbear/Default
  42. URL:=https://matt.ucc.asn.au/dropbear/
  43. endef
  44. define Package/dropbear/config
  45. source "$(SOURCE)/Config.in"
  46. endef
  47. define Package/dropbear
  48. $(call Package/dropbear/Default)
  49. SECTION:=net
  50. CATEGORY:=Base system
  51. TITLE:=Small SSH2 client/server
  52. MENU:=1
  53. DEPENDS:= +USE_GLIBC:libcrypt-compat +DROPBEAR_ZLIB:zlib
  54. ALTERNATIVES:=100:/usr/bin/ssh-keygen:/usr/sbin/dropbear
  55. $(if $(CONFIG_DROPBEAR_SCP),ALTERNATIVES+= \
  56. 100:/usr/bin/scp:/usr/sbin/dropbear,)
  57. $(if $(CONFIG_DROPBEAR_DBCLIENT),ALTERNATIVES+= \
  58. 100:/usr/bin/ssh:/usr/sbin/dropbear,)
  59. endef
  60. define Package/dropbear/description
  61. A small SSH2 server/client designed for small memory environments.
  62. endef
  63. define Package/dropbear/conffiles
  64. /etc/config/dropbear
  65. /etc/dropbear/authorized_keys
  66. /etc/dropbear/dropbear_ecdsa_host_key
  67. /etc/dropbear/dropbear_ed25519_host_key
  68. /etc/dropbear/dropbear_rsa_host_key
  69. endef
  70. define Package/dropbearconvert
  71. $(call Package/dropbear/Default)
  72. SECTION:=utils
  73. CATEGORY:=Utilities
  74. TITLE:=Utility for converting SSH keys
  75. DEPENDS:= +DROPBEAR_ZLIB:zlib
  76. endef
  77. CONFIGURE_ARGS += \
  78. --disable-pam \
  79. --disable-pututxline \
  80. --disable-utmpx \
  81. --disable-wtmpx \
  82. $(if $(CONFIG_DROPBEAR_LASTLOG),,--disable-lastlog) \
  83. $(if $(CONFIG_DROPBEAR_LOGINFUNC),,--disable-loginfunc) \
  84. $(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \
  85. $(if $(CONFIG_DROPBEAR_STATIC_BUILD),--enable-static,--disable-static) \
  86. $(if $(CONFIG_DROPBEAR_UTMP),,--disable-utmp) \
  87. $(if $(CONFIG_DROPBEAR_WTMP),,--disable-wtmp) \
  88. $(if $(CONFIG_DROPBEAR_ZLIB),,--disable-zlib) \
  89. --enable-bundled-libtom
  90. ##############################################################################
  91. #
  92. # option,value - add option to localoptions.h
  93. # !!option,value - replace option in src/sysoptions.h
  94. #
  95. ##############################################################################
  96. # adjust allowed shell list (if getusershell(3) is missing):
  97. # - COMPAT_USER_SHELLS
  98. # remove version number from protocol ident:
  99. # - IDENT_VERSION_PART
  100. # disable unused functionality:
  101. # - DO_MOTD
  102. DB_OPT_COMMON = \
  103. IDENT_VERSION_PART,"" \
  104. COMPAT_USER_SHELLS,"/bin/ash","/bin/sh" \
  105. DEFAULT_PATH,"$(TARGET_INIT_PATH)" \
  106. DEFAULT_ROOT_PATH,"$(TARGET_INIT_PATH)" \
  107. DO_MOTD,0 \
  108. AUTH_TIMEOUT,$(CONFIG_DROPBEAR_AUTH_TIMEOUT) \
  109. DEBUG_TRACE,$(CONFIG_DROPBEAR_DEBUG_TRACE) \
  110. DEFAULT_IDLE_TIMEOUT,$(CONFIG_DROPBEAR_DEFAULT_IDLE_TIMEOUT) \
  111. DEFAULT_KEEPALIVE_LIMIT,$(CONFIG_DROPBEAR_DEFAULT_KEEPALIVE_LIMIT) \
  112. DEFAULT_KEEPALIVE,$(CONFIG_DROPBEAR_DEFAULT_KEEPALIVE) \
  113. DEFAULT_RECV_WINDOW,$(CONFIG_DROPBEAR_DEFAULT_RECV_WINDOW) \
  114. KEX_REKEY_DATA,$(CONFIG_DROPBEAR_KEX_REKEY_DATA) \
  115. KEX_REKEY_TIMEOUT,$(CONFIG_DROPBEAR_KEX_REKEY_TIMEOUT) \
  116. MAX_AUTH_TRIES,$(CONFIG_DROPBEAR_MAX_AUTH_TRIES) \
  117. MAX_UNAUTH_CLIENTS,$(CONFIG_DROPBEAR_MAX_UNAUTH_CLIENTS) \
  118. MAX_UNAUTH_PER_IP,$(CONFIG_DROPBEAR_MAX_UNAUTH_PER_IP) \
  119. UNAUTH_CLOSE_DELAY,$(CONFIG_DROPBEAR_UNAUTH_CLOSE_DELAY) \
  120. $(if $(CONFIG_DROPBEAR_RSA),DROPBEAR_DEFAULT_RSA_SIZE$(comma)$(CONFIG_DROPBEAR_DEFAULT_RSA_SIZE)) \
  121. $(if $(CONFIG_DROPBEAR_LASTLOG),LASTLOG_FILE$(comma)$(CONFIG_DROPBEAR_LASTLOG_PATH)) \
  122. $(if $(CONFIG_DROPBEAR_UTMP),UTMP_FILE$(comma)$(CONFIG_DROPBEAR_UTMP_PATH)) \
  123. $(if $(CONFIG_DROPBEAR_WTMP),WTMP_FILE$(comma)$(CONFIG_DROPBEAR_WTMP_PATH)) \
  124. ##############################################################################
  125. #
  126. # option,config,enabled,disabled = add option to localoptions.h
  127. # !!option,config,enabled,disabled = replace option in src/sysoptions.h
  128. #
  129. # option := (config) ? enabled : disabled
  130. #
  131. ##############################################################################
  132. DB_OPT_CONFIG = \
  133. !!DROPBEAR_CLI_MULTIHOP,CONFIG_DROPBEAR_CLI_MULTIHOP,1,0 \
  134. !!DROPBEAR_ECC_256,CONFIG_DROPBEAR_ECC_256,1,0 \
  135. !!DROPBEAR_ECC_384,CONFIG_DROPBEAR_ECC_384,1,0 \
  136. !!DROPBEAR_ECC_521,CONFIG_DROPBEAR_ECC_521,1,0 \
  137. DO_HOST_LOOKUP,CONFIG_DROPBEAR_DO_HOST_LOOKUP,1,0 \
  138. DROPBEAR_3DES,CONFIG_DROPBEAR_3DES,1,0 \
  139. DROPBEAR_AES128,CONFIG_DROPBEAR_AES128,1,0 \
  140. DROPBEAR_AES256,CONFIG_DROPBEAR_AES256,1,0 \
  141. DROPBEAR_CHACHA20POLY1305,CONFIG_DROPBEAR_CHACHA20POLY1305,1,0 \
  142. DROPBEAR_CLI_AGENTFWD,CONFIG_DROPBEAR_CLI_AGENTFWD,1,0 \
  143. DROPBEAR_CLI_ASKPASS_HELPER,CONFIG_DROPBEAR_CLI_ASKPASS_HELPER,1,0 \
  144. DROPBEAR_CLI_IMMEDIATE_AUTH,CONFIG_DROPBEAR_CLI_IMMEDIATE_AUTH,1,0 \
  145. DROPBEAR_CLI_LOCALTCPFWD,CONFIG_DROPBEAR_CLI_LOCALTCPFWD,1,0 \
  146. DROPBEAR_CLI_NETCAT,CONFIG_DROPBEAR_CLI_NETCAT,1,0 \
  147. DROPBEAR_CLI_PROXYCMD,CONFIG_DROPBEAR_CLI_PROXYCMD,1,0 \
  148. DROPBEAR_CLI_REMOTETCPFWD,CONFIG_DROPBEAR_CLI_REMOTETCPFWD,1,0 \
  149. DROPBEAR_CURVE25519,CONFIG_DROPBEAR_CURVE25519,1,0 \
  150. DROPBEAR_DELAY_HOSTKEY,CONFIG_DROPBEAR_DELAY_HOSTKEY,1,0 \
  151. DROPBEAR_DH_GROUP1,CONFIG_DROPBEAR_DH_GROUP1,1,0 \
  152. DROPBEAR_DH_GROUP1_CLIENTONLY,CONFIG_DROPBEAR_DH_GROUP1_CLIENTONLY,1,0 \
  153. DROPBEAR_DH_GROUP14_SHA1,CONFIG_DROPBEAR_DH_GROUP14_SHA1,1,0 \
  154. DROPBEAR_DH_GROUP14_SHA256,CONFIG_DROPBEAR_DH_GROUP14_SHA256,1,0 \
  155. DROPBEAR_DH_GROUP16,CONFIG_DROPBEAR_DH_GROUP16,1,0 \
  156. DROPBEAR_DSS,CONFIG_DROPBEAR_DSS,1,0 \
  157. DROPBEAR_ECDH,CONFIG_DROPBEAR_ECDH,1,0 \
  158. DROPBEAR_ECDSA,CONFIG_DROPBEAR_ECDSA,1,0 \
  159. DROPBEAR_ED25519,CONFIG_DROPBEAR_ED25519,1,0 \
  160. DROPBEAR_ENABLE_CBC_MODE,CONFIG_DROPBEAR_ENABLE_CBC_MODE,1,0 \
  161. DROPBEAR_ENABLE_CTR_MODE,CONFIG_DROPBEAR_ENABLE_CTR_MODE,1,0 \
  162. DROPBEAR_ENABLE_GCM_MODE,CONFIG_DROPBEAR_ENABLE_GCM_MODE,1,0 \
  163. DROPBEAR_MLKEM768,CONFIG_DROPBEAR_MLKEM768,1,0 \
  164. DROPBEAR_REEXEC,CONFIG_DROPBEAR_REEXEC,1,0 \
  165. DROPBEAR_RSA_SHA1,CONFIG_DROPBEAR_RSA_SHA1,1,0 \
  166. DROPBEAR_RSA,CONFIG_DROPBEAR_RSA,1,0 \
  167. DROPBEAR_SFTPSERVER,CONFIG_DROPBEAR_SFTPSERVER,1,0 \
  168. DROPBEAR_SHA1_96_HMAC,CONFIG_DROPBEAR_SHA1_96_HMAC,1,0 \
  169. DROPBEAR_SHA1_HMAC,CONFIG_DROPBEAR_SHA1_HMAC,1,0 \
  170. DROPBEAR_SHA2_256_HMAC,CONFIG_DROPBEAR_SHA2_256_HMAC,1,0 \
  171. DROPBEAR_SHA2_512_HMAC,CONFIG_DROPBEAR_SHA2_512_HMAC,1,0 \
  172. DROPBEAR_SK_ECDSA,CONFIG_DROPBEAR_SK_ECDSA,1,0 \
  173. DROPBEAR_SK_ED25519,CONFIG_DROPBEAR_SK_ED25519,1,0 \
  174. DROPBEAR_SK_KEYS,CONFIG_DROPBEAR_SK_KEYS,1,0 \
  175. DROPBEAR_SMALL_CODE,CONFIG_DROPBEAR_SMALL_CODE,1,0 \
  176. DROPBEAR_SNTRUP761,CONFIG_DROPBEAR_SNTRUP761,1,0 \
  177. DROPBEAR_SVR_AGENTFWD,CONFIG_DROPBEAR_SVR_AGENTFWD,1,0 \
  178. DROPBEAR_SVR_LOCALSTREAMFWD,CONFIG_DROPBEAR_SVR_LOCALSTREAMFWD,1,0 \
  179. DROPBEAR_SVR_LOCALTCPFWD,CONFIG_DROPBEAR_SVR_LOCALTCPFWD,1,0 \
  180. DROPBEAR_SVR_PUBKEY_OPTIONS,CONFIG_DROPBEAR_SVR_PUBKEY_OPTIONS,1,0 \
  181. DROPBEAR_SVR_REMOTETCPFWD,CONFIG_DROPBEAR_SVR_REMOTETCPFWD,1,0 \
  182. DROPBEAR_USE_PASSWORD_ENV,CONFIG_DROPBEAR_USE_PASSWORD_ENV,1,0 \
  183. DROPBEAR_USE_SSH_CONFIG,CONFIG_DROPBEAR_USE_SSH_CONFIG,1,0 \
  184. DROPBEAR_USER_ALGO_LIST,CONFIG_DROPBEAR_USER_ALGO_LIST,1,0 \
  185. DROPBEAR_X11FWD,CONFIG_DROPBEAR_X11FWD,1,0 \
  186. INETD_MODE,CONFIG_DROPBEAR_INETD_MODE,1,0 \
  187. LOG_COMMANDS,CONFIG_DROPBEAR_LOG_COMMANDS,1,0 \
  188. TARGET_CFLAGS += -DARGTYPE=3
  189. xsedx:=$(shell printf '\027')
  190. db_opt_add =echo '\#define $(1) $(2)' >> $(PKG_BUILD_DIR)/localoptions.h
  191. db_opt_replace =$(ESED) '/^\#define $(1) .*$$$$/{h;:a;$$$$!n;/^\#.+$$$$/bb;/^$$$$/bb;H;ba;:b;x;s$(xsedx)^.+$$$$$(xsedx)\#define $(1) $(2)$(xsedx)p;x};p' -n $(PKG_BUILD_DIR)/src/sysoptions.h
  192. define Build/Configure/dropbear_headers
  193. $(strip $(foreach s,$(DB_OPT_COMMON), \
  194. $(if $(filter !!%,$(word 1,$(subst $(comma),$(space),$(s)))), \
  195. $(call db_opt_replace,$(patsubst !!%,%,$(word 1,$(subst $(comma),$(space),$(s)))),$(subst $(space),$(comma),$(wordlist 2,$(words $(subst $(comma),$(space),$(s))),$(subst $(comma),$(space),$(s))))), \
  196. $(call db_opt_add,$(word 1,$(subst $(comma),$(space),$(s))),$(subst $(space),$(comma),$(wordlist 2,$(words $(subst $(comma),$(space),$(s))),$(subst $(comma),$(space),$(s))))) \
  197. ) ; \
  198. ))
  199. $(strip $(foreach s,$(DB_OPT_CONFIG), \
  200. $(if $(filter !!%,$(word 1,$(subst $(comma),$(space),$(s)))), \
  201. $(call db_opt_replace,$(patsubst !!%,%,$(word 1,$(subst $(comma),$(space),$(s)))),$(if $($(word 2,$(subst $(comma),$(space),$(s)))),$(word 3,$(subst $(comma),$(space),$(s))),$(word 4,$(subst $(comma),$(space),$(s))))), \
  202. $(call db_opt_add,$(word 1,$(subst $(comma),$(space),$(s))),$(if $($(word 2,$(subst $(comma),$(space),$(s)))),$(word 3,$(subst $(comma),$(space),$(s))),$(word 4,$(subst $(comma),$(space),$(s))))) \
  203. ) ; \
  204. ))
  205. endef
  206. define Build/Configure
  207. rm -f $(PKG_BUILD_DIR)/localoptions.h
  208. $(Build/Configure/Default)
  209. : > $(PKG_BUILD_DIR)/localoptions.h
  210. $(Build/Configure/dropbear_headers)
  211. # Enforce rebuild
  212. rm -rf $(PKG_BUILD_DIR)/obj
  213. +$(MAKE) -C $(PKG_BUILD_DIR)/libtomcrypt clean
  214. +$(MAKE) -C $(PKG_BUILD_DIR)/libtommath clean
  215. endef
  216. define Build/Compile
  217. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  218. $(TARGET_CONFIGURE_OPTS) \
  219. IGNORE_SPEED=1 \
  220. PROGRAMS="dropbear $(if $(CONFIG_DROPBEAR_DBCLIENT),dbclient,) dropbearkey $(if $(CONFIG_DROPBEAR_SCP),scp,)" \
  221. MULTI=1 SCPPROGRESS=1
  222. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  223. $(TARGET_CONFIGURE_OPTS) \
  224. IGNORE_SPEED=1 \
  225. PROGRAMS="dropbearconvert"
  226. endef
  227. define Package/dropbear/install
  228. $(INSTALL_DIR) $(1)/usr/sbin
  229. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/usr/sbin/dropbear
  230. $(INSTALL_DIR) $(1)/usr/bin
  231. $(if $(CONFIG_DROPBEAR_DBCLIENT),$(LN) ../sbin/dropbear $(1)/usr/bin/dbclient,)
  232. $(LN) ../sbin/dropbear $(1)/usr/bin/dropbearkey
  233. $(INSTALL_DIR) $(1)/etc/config
  234. $(INSTALL_CONF) ./files/dropbear.config $(1)/etc/config/dropbear
  235. $(INSTALL_DIR) $(1)/etc/init.d
  236. $(INSTALL_BIN) ./files/dropbear.init $(1)/etc/init.d/dropbear
  237. $(INSTALL_DIR) $(1)/etc/dropbear
  238. $(INSTALL_DIR) $(1)/lib/preinit
  239. $(INSTALL_DATA) ./files/dropbear.failsafe $(1)/lib/preinit/99_10_failsafe_dropbear
  240. $(INSTALL_DIR) $(1)/etc/uci-defaults
  241. $(INSTALL_DATA) ./files/dropbear.defaults $(1)/etc/uci-defaults/50-dropbear
  242. $(foreach f,$(filter /etc/dropbear/%,$(Package/dropbear/conffiles)),$(if $(wildcard $(TOPDIR)/files/$(f)),chmod 0600 $(TOPDIR)/files/$(f) || :; ))
  243. endef
  244. define Package/dropbearconvert/install
  245. $(INSTALL_DIR) $(1)/usr/bin
  246. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert $(1)/usr/bin/dropbearconvert
  247. endef
  248. $(eval $(call BuildPackage,dropbear))
  249. $(eval $(call BuildPackage,dropbearconvert))