Makefile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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.49
  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. http://www.mirrors.wiretapped.net/security/cryptography/apps/ssh/dropbear/
  15. PKG_MD5SUM:=7b20c85f1ee34f018a1b948eae003df9
  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. DESCRIPTION:=\
  26. A small SSH2 server/client designed for small memory environments.
  27. endef
  28. define Package/dropbearconvert
  29. $(call Package/dropbear/Default)
  30. SECTION:=utils
  31. CATEGORY:=Utilities
  32. TITLE:=Utility for converting SSH keys
  33. endef
  34. CONFIGURE_ARGS += \
  35. --with-shared \
  36. --disable-pam \
  37. --enable-openpty \
  38. --enable-syslog \
  39. --disable-shadow \
  40. --disable-lastlog \
  41. --disable-utmp \
  42. --disable-utmpx \
  43. --disable-wtmp \
  44. --disable-wtmpx \
  45. --disable-loginfunc \
  46. --disable-pututline \
  47. --disable-pututxline \
  48. --disable-zlib
  49. define Build/Configure
  50. $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h
  51. $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR)/options.h
  52. $(call Build/Configure/Default)
  53. endef
  54. define Build/Compile
  55. $(MAKE) -C $(PKG_BUILD_DIR) \
  56. $(TARGET_CONFIGURE_OPTS) \
  57. LD="$(TARGET_CC)" \
  58. PROGRAMS="dropbear dbclient dropbearkey scp" \
  59. MULTI=1 SCPPROGRESS=1
  60. $(MAKE) -C $(PKG_BUILD_DIR) \
  61. $(TARGET_CONFIGURE_OPTS) \
  62. LD="$(TARGET_CC)" \
  63. PROGRAMS="dropbearconvert"
  64. endef
  65. define Package/dropbear/install
  66. $(INSTALL_DIR) $(1)/usr/sbin
  67. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti \
  68. $(1)/usr/sbin/dropbear
  69. $(INSTALL_DIR) $(1)/usr/bin
  70. ln -sf ../sbin/dropbear $(1)/usr/bin/scp
  71. ln -sf ../sbin/dropbear $(1)/usr/bin/ssh
  72. ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient
  73. ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey
  74. $(INSTALL_DIR) $(1)/etc/config
  75. $(INSTALL_DATA) ./files/dropbear.config $(1)/etc/config/dropbear
  76. $(INSTALL_DIR) $(1)/etc/init.d
  77. $(INSTALL_BIN) ./files/dropbear.init $(1)/etc/init.d/dropbear
  78. endef
  79. define Package/dropbearconvert/install
  80. $(INSTALL_DIR) $(1)/usr/bin
  81. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert \
  82. $(1)/usr/bin/dropbearconvert
  83. endef
  84. $(eval $(call BuildPackage,dropbear))
  85. $(eval $(call BuildPackage,dropbearconvert))