Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. PKG_CAT:=zcat
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  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. DESCRIPTION:=\
  27. A small SSH2 server/client designed for small memory environments.
  28. endef
  29. define Package/dropbearconvert
  30. $(call Package/dropbear/Default)
  31. SECTION:=utils
  32. CATEGORY:=Utilities
  33. TITLE:=Utility for converting SSH keys
  34. endef
  35. CONFIGURE_ARGS += \
  36. --with-shared \
  37. --disable-pam \
  38. --enable-openpty \
  39. --enable-syslog \
  40. --disable-shadow \
  41. --disable-lastlog \
  42. --disable-utmp \
  43. --disable-utmpx \
  44. --disable-wtmp \
  45. --disable-wtmpx \
  46. --disable-loginfunc \
  47. --disable-pututline \
  48. --disable-pututxline \
  49. --disable-zlib
  50. define Build/Configure
  51. $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h
  52. $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR)/options.h
  53. $(call Build/Configure/Default)
  54. endef
  55. define Build/Compile
  56. $(MAKE) -C $(PKG_BUILD_DIR) \
  57. $(TARGET_CONFIGURE_OPTS) \
  58. LD="$(TARGET_CC)" \
  59. PROGRAMS="dropbear dbclient dropbearkey scp" \
  60. MULTI=1 SCPPROGRESS=1
  61. $(MAKE) -C $(PKG_BUILD_DIR) \
  62. $(TARGET_CONFIGURE_OPTS) \
  63. LD="$(TARGET_CC)" \
  64. PROGRAMS="dropbearconvert"
  65. endef
  66. define Package/dropbear/install
  67. $(INSTALL_DIR) $(1)/usr/sbin
  68. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti \
  69. $(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. endef
  80. define Package/dropbearconvert/install
  81. $(INSTALL_DIR) $(1)/usr/bin
  82. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert \
  83. $(1)/usr/bin/dropbearconvert
  84. endef
  85. $(eval $(call BuildPackage,dropbear))
  86. $(eval $(call BuildPackage,dropbearconvert))