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.

67 lines
1.5 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_OPENSSL: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. source "$(SOURCE)/Config.in"
  38. endef
  39. CMAKE_OPTIONS += \
  40. -DBUILD_SHARED_LIBS=ON \
  41. -DBUILD_TESTING=OFF \
  42. -DENABLE_ZLIB_COMPRESSION=ON \
  43. -DCLEAR_MEMORY=ON
  44. ifeq ($(CONFIG_LIBSSH2_OPENSSL),y)
  45. CMAKE_OPTIONS += -DCRYPTO_BACKEND=OpenSSL
  46. else
  47. CMAKE_OPTIONS += -DCRYPTO_BACKEND=mbedTLS
  48. endif
  49. define Package/libssh2/install
  50. $(INSTALL_DIR) $(1)/usr/lib
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so.$(ABI_VERSION)* $(1)/usr/lib/
  52. endef
  53. $(eval $(call BuildPackage,libssh2))