Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #
  2. # Copyright (C) 2006-2012 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=dropbear
  9. PKG_VERSION:=2012.55
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:= \
  13. http://matt.ucc.asn.au/dropbear/releases/ \
  14. http://www.mirrors.wiretapped.net/security/cryptography/apps/ssh/dropbear/
  15. PKG_MD5SUM:=8c784baec3054cdb1bb4bfa792c87812
  16. PKG_LICENSE:=MIT
  17. PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/dropbear/Default
  21. URL:=http://matt.ucc.asn.au/dropbear/
  22. endef
  23. define Package/dropbear
  24. $(call Package/dropbear/Default)
  25. SECTION:=net
  26. CATEGORY:=Base system
  27. TITLE:=Small SSH2 client/server
  28. endef
  29. define Package/dropbear/description
  30. A small SSH2 server/client designed for small memory environments.
  31. endef
  32. define Package/dropbear/conffiles
  33. /etc/dropbear/dropbear_rsa_host_key
  34. /etc/dropbear/dropbear_dss_host_key
  35. /etc/config/dropbear
  36. endef
  37. define Package/dropbearconvert
  38. $(call Package/dropbear/Default)
  39. SECTION:=utils
  40. CATEGORY:=Utilities
  41. TITLE:=Utility for converting SSH keys
  42. endef
  43. CONFIGURE_ARGS += \
  44. --with-shared \
  45. --disable-pam \
  46. --enable-openpty \
  47. --enable-syslog \
  48. $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \
  49. --disable-lastlog \
  50. --disable-utmp \
  51. --disable-utmpx \
  52. --disable-wtmp \
  53. --disable-wtmpx \
  54. --disable-loginfunc \
  55. --disable-pututline \
  56. --disable-pututxline \
  57. --disable-zlib \
  58. --enable-bundled-libtom
  59. TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections
  60. TARGET_LDFLAGS += -Wl,--gc-sections
  61. define Build/Compile
  62. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  63. $(TARGET_CONFIGURE_OPTS) \
  64. PROGRAMS="dropbear dbclient dropbearkey scp" \
  65. MULTI=1 SCPPROGRESS=1
  66. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  67. $(TARGET_CONFIGURE_OPTS) \
  68. PROGRAMS="dropbearconvert"
  69. endef
  70. define Package/dropbear/install
  71. $(INSTALL_DIR) $(1)/usr/sbin
  72. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/usr/sbin/dropbear
  73. $(INSTALL_DIR) $(1)/usr/bin
  74. ln -sf ../sbin/dropbear $(1)/usr/bin/scp
  75. ln -sf ../sbin/dropbear $(1)/usr/bin/ssh
  76. ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient
  77. ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey
  78. $(INSTALL_DIR) $(1)/etc/config
  79. $(INSTALL_DATA) ./files/dropbear.config $(1)/etc/config/dropbear
  80. $(INSTALL_DIR) $(1)/etc/init.d
  81. $(INSTALL_BIN) ./files/dropbear.init $(1)/etc/init.d/dropbear
  82. $(INSTALL_DIR) $(1)/usr/lib/opkg/info
  83. $(INSTALL_DIR) $(1)/etc/dropbear
  84. touch $(1)/etc/dropbear/dropbear_rsa_host_key
  85. touch $(1)/etc/dropbear/dropbear_dss_host_key
  86. endef
  87. define Package/dropbearconvert/install
  88. $(INSTALL_DIR) $(1)/usr/bin
  89. $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert $(1)/usr/bin/dropbearconvert
  90. endef
  91. $(eval $(call BuildPackage,dropbear))
  92. $(eval $(call BuildPackage,dropbearconvert))