Makefile 2.8 KB

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