Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #
  2. # Copyright (C) 2006-2008 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # $Id$
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=dropbear
  10. PKG_VERSION:=0.51
  11. PKG_RELEASE:=2
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:= \
  14. http://www.mirrors.wiretapped.net/security/cryptography/apps/ssh/dropbear/ \
  15. http://matt.ucc.asn.au/dropbear/releases/
  16. PKG_MD5SUM:=1045df60c2bdbd39c707238305a1e9e5
  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/dropbearconvert
  31. $(call Package/dropbear/Default)
  32. SECTION:=utils
  33. CATEGORY:=Utilities
  34. TITLE:=Utility for converting SSH keys
  35. endef
  36. CONFIGURE_ARGS += \
  37. --with-shared \
  38. --disable-pam \
  39. --enable-openpty \
  40. --enable-syslog \
  41. $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \
  42. --disable-lastlog \
  43. --disable-utmp \
  44. --disable-utmpx \
  45. --disable-wtmp \
  46. --disable-wtmpx \
  47. --disable-loginfunc \
  48. --disable-pututline \
  49. --disable-pututxline \
  50. --disable-zlib
  51. define Build/Configure
  52. $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h
  53. $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR)/options.h
  54. $(call Build/Configure/Default)
  55. endef
  56. define Build/Compile
  57. $(MAKE) -C $(PKG_BUILD_DIR) \
  58. $(TARGET_CONFIGURE_OPTS) \
  59. LD="$(TARGET_CC)" \
  60. PROGRAMS="dropbear dbclient dropbearkey scp" \
  61. MULTI=1 SCPPROGRESS=1
  62. $(MAKE) -C $(PKG_BUILD_DIR) \
  63. $(TARGET_CONFIGURE_OPTS) \
  64. LD="$(TARGET_CC)" \
  65. PROGRAMS="dropbearconvert"
  66. endef
  67. define Package/dropbear/install
  68. $(INSTALL_DIR) $(1)/usr/sbin
  69. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/usr/sbin/dropbear
  70. $(INSTALL_DIR) $(1)/usr/bin
  71. ln -sf ../sbin/dropbear $(1)/usr/bin/scp
  72. ln -sf ../sbin/dropbear $(1)/usr/bin/ssh
  73. ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient
  74. ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey
  75. $(INSTALL_DIR) $(1)/etc/config
  76. $(INSTALL_DATA) ./files/dropbear.config $(1)/etc/config/dropbear
  77. $(INSTALL_DIR) $(1)/etc/init.d
  78. $(INSTALL_BIN) ./files/dropbear.init $(1)/etc/init.d/dropbear
  79. $(INSTALL_DIR) $(1)/usr/lib/opkg/info
  80. echo /etc/dropbear/dropbear_rsa_host_key > $(1)/usr/lib/opkg/info/dropbear.conffiles
  81. echo /etc/dropbear/dropbear_dss_host_key >> $(1)/usr/lib/opkg/info/dropbear.conffiles
  82. endef
  83. define Package/dropbearconvert/install
  84. $(INSTALL_DIR) $(1)/usr/bin
  85. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert $(1)/usr/bin/dropbearconvert
  86. endef
  87. $(eval $(call BuildPackage,dropbear))
  88. $(eval $(call BuildPackage,dropbearconvert))