Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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:=2
  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. $(INSTALL_DIR) $(1)/usr/lib/ipkg/info
  79. echo /etc/dropbear/dropbear_rsa_host_key > $(1)/usr/lib/ipkg/info/dropbear.conffiles
  80. echo /etc/dropbear/dropbear_dss_host_key >> $(1)/usr/lib/ipkg/info/dropbear.conffiles
  81. endef
  82. define Package/dropbearconvert/install
  83. $(INSTALL_DIR) $(1)/usr/bin
  84. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert \
  85. $(1)/usr/bin/dropbearconvert
  86. endef
  87. $(eval $(call BuildPackage,dropbear))
  88. $(eval $(call BuildPackage,dropbearconvert))