Makefile 2.4 KB

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