Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #
  2. # Copyright (C) 2006-2009 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:=0.52
  10. PKG_RELEASE:=5
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:= \
  13. http://matt.ucc.asn.au/dropbear/releases/ \
  14. http://www.mirrors.wiretapped.net/security/cryptography/apps/ssh/dropbear/
  15. PKG_MD5SUM:=1c69ec674481d7745452f68f2ea5597e
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/dropbear/Default
  19. URL:=http://matt.ucc.asn.au/dropbear/
  20. endef
  21. define Package/dropbear
  22. $(call Package/dropbear/Default)
  23. SECTION:=net
  24. CATEGORY:=Base system
  25. TITLE:=Small SSH2 client/server
  26. endef
  27. define Package/dropbear/description
  28. A small SSH2 server/client designed for small memory environments.
  29. endef
  30. define Package/dropbear/conffiles
  31. /etc/dropbear/dropbear_rsa_host_key
  32. /etc/dropbear/dropbear_dss_host_key
  33. /etc/config/dropbear
  34. endef
  35. define Package/dropbearconvert
  36. $(call Package/dropbear/Default)
  37. SECTION:=utils
  38. CATEGORY:=Utilities
  39. TITLE:=Utility for converting SSH keys
  40. endef
  41. CONFIGURE_ARGS += \
  42. --with-shared \
  43. --disable-pam \
  44. --enable-openpty \
  45. --enable-syslog \
  46. $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \
  47. --disable-lastlog \
  48. --disable-utmp \
  49. --disable-utmpx \
  50. --disable-wtmp \
  51. --disable-wtmpx \
  52. --disable-loginfunc \
  53. --disable-pututline \
  54. --disable-pututxline \
  55. --disable-zlib
  56. define Build/Configure
  57. $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h
  58. $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR)/options.h
  59. $(call Build/Configure/Default)
  60. endef
  61. define Build/Compile
  62. $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  63. $(TARGET_CONFIGURE_OPTS) \
  64. LD="$(TARGET_CC)" \
  65. PROGRAMS="dropbear dbclient dropbearkey scp" \
  66. MULTI=1 SCPPROGRESS=1
  67. $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  68. $(TARGET_CONFIGURE_OPTS) \
  69. LD="$(TARGET_CC)" \
  70. PROGRAMS="dropbearconvert"
  71. endef
  72. define Package/dropbear/install
  73. $(INSTALL_DIR) $(1)/usr/sbin
  74. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/usr/sbin/dropbear
  75. $(INSTALL_DIR) $(1)/usr/bin
  76. ln -sf ../sbin/dropbear $(1)/usr/bin/scp
  77. ln -sf ../sbin/dropbear $(1)/usr/bin/ssh
  78. ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient
  79. ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey
  80. $(INSTALL_DIR) $(1)/etc/config
  81. $(INSTALL_DATA) ./files/dropbear.config $(1)/etc/config/dropbear
  82. $(INSTALL_DIR) $(1)/etc/init.d
  83. $(INSTALL_BIN) ./files/dropbear.init $(1)/etc/init.d/dropbear
  84. $(INSTALL_DIR) $(1)/usr/lib/opkg/info
  85. $(INSTALL_DIR) $(1)/etc/dropbear
  86. touch $(1)/etc/dropbear/dropbear_rsa_host_key
  87. touch $(1)/etc/dropbear/dropbear_dss_host_key
  88. endef
  89. define Package/dropbearconvert/install
  90. $(INSTALL_DIR) $(1)/usr/bin
  91. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert $(1)/usr/bin/dropbearconvert
  92. endef
  93. $(eval $(call BuildPackage,dropbear))
  94. $(eval $(call BuildPackage,dropbearconvert))