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.

75 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_BUILD_PARALLEL:=1
  20. PKG_CONFIG_DEPENDS:= \
  21. CONFIG_LIBSSH2_MBEDTLS \
  22. CONFIG_LIBSSH2_OPENSSL
  23. include $(INCLUDE_DIR)/package.mk
  24. include $(INCLUDE_DIR)/cmake.mk
  25. define Package/libssh2
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. TITLE:=SSH2 library
  29. URL:=https://www.libssh2.org/
  30. DEPENDS:=+LIBSSH2_MBEDTLS:libmbedtls +!LIBSSH2_MBEDTLS:libopenssl +zlib
  31. ABI_VERSION:=1
  32. endef
  33. define Package/libssh2/description
  34. libssh2 is a client-side C library implementing the SSH2 protocol.
  35. endef
  36. define Package/libssh2/config
  37. if PACKAGE_libssh2
  38. choice
  39. prompt "Choose crypto backend"
  40. default LIBSSH2_OPENSSL
  41. config LIBSSH2_OPENSSL
  42. bool "openssl"
  43. config LIBSSH2_MBEDTLS
  44. bool "mbedtls"
  45. endchoice
  46. endif
  47. endef
  48. CMAKE_OPTIONS += \
  49. -DBUILD_SHARED_LIBS=ON \
  50. -DBUILD_TESTING=OFF \
  51. -DENABLE_ZLIB_COMPRESSION=ON \
  52. -DCLEAR_MEMORY=ON \
  53. -DCRYPTO_BACKEND=$(if $(CONFIG_LIBSSH2_MBEDTLS),mbedTLS,OpenSSL)
  54. define Package/libssh2/install
  55. $(INSTALL_DIR) $(1)/usr/lib
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so.$(ABI_VERSION)* $(1)/usr/lib/
  57. endef
  58. $(eval $(call BuildPackage,libssh2))