You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2015-2018 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:=libssh2
  9. PKG_VERSION:=1.9.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://www.libssh2.org/download
  13. PKG_HASH:=d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd
  14. PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:libssh2:libssh2
  18. CMAKE_INSTALL:=1
  19. PKG_CONFIG_DEPENDS:= \
  20. CONFIG_LIBSSH2_MBEDTLS \
  21. CONFIG_LIBSSH2_OPENSSL
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/cmake.mk
  24. define Package/libssh2
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. TITLE:=SSH2 library
  28. URL:=https://www.libssh2.org/
  29. DEPENDS:=+LIBSSH2_MBEDTLS:libmbedtls +!LIBSSH2_MBEDTLS:libopenssl +zlib
  30. ABI_VERSION:=1
  31. endef
  32. define Package/libssh2/description
  33. libssh2 is a client-side C library implementing the SSH2 protocol.
  34. endef
  35. define Package/libssh2/config
  36. if PACKAGE_libssh2
  37. choice
  38. prompt "Choose crypto backend"
  39. default LIBSSH2_OPENSSL
  40. config LIBSSH2_OPENSSL
  41. bool "openssl"
  42. config LIBSSH2_MBEDTLS
  43. bool "mbedtls"
  44. endchoice
  45. endif
  46. endef
  47. CMAKE_OPTIONS += \
  48. -DBUILD_SHARED_LIBS=ON \
  49. -DBUILD_TESTING=OFF \
  50. -DENABLE_ZLIB_COMPRESSION=ON \
  51. -DCLEAR_MEMORY=ON \
  52. -DCRYPTO_BACKEND=$(if $(CONFIG_LIBSSH2_MBEDTLS),mbedTLS,OpenSSL)
  53. define Package/libssh2/install
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so.$(ABI_VERSION)* $(1)/usr/lib/
  56. endef
  57. $(eval $(call BuildPackage,libssh2))