Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.10.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://www.libssh2.org/download
  13. PKG_HASH:=2d64e90f3ded394b91d3a2e774ca203a4179f69aebee03003e5a6fa621e41d51
  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))