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.

70 lines
1.8 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.8.2
  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:=088307d9f6b6c4b8c13f34602e8ff65d21c2dc4d55284dfe15d502c4ee190d67
  14. PKG_FIXUP:=autoreconf
  15. PKG_INSTALL:=1
  16. PKG_LICENSE:=BSD
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_CPE_ID:=cpe:/a:libssh2:libssh2
  19. PKG_CONFIG_DEPENDS:= \
  20. CONFIG_LIBSSH2_MBEDTLS \
  21. CONFIG_LIBSSH2_OPENSSL
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/libssh2
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=SSH2 library
  27. URL:=https://www.libssh2.org/
  28. DEPENDS:=+LIBSSH2_MBEDTLS:libmbedtls +LIBSSH2_OPENSSL:libopenssl +zlib
  29. MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
  30. endef
  31. define Package/libssh2/description
  32. libssh2 is a client-side C library implementing the SSH2 protocol.
  33. endef
  34. define Package/libssh2/config
  35. source "$(SOURCE)/Config.in"
  36. endef
  37. CONFIGURE_ARGS += \
  38. --disable-examples-build \
  39. --disable-silent-rules \
  40. $(if $(CONFIG_LIBSSH2_MBEDTLS),--with-mbedtls --with-libmbedtls-prefix=$(STAGING_DIR)/usr) \
  41. $(if $(CONFIG_LIBSSH2_OPENSSL),--with-openssl --with-libssl-prefix=$(STAGING_DIR)/usr) \
  42. --with-libz-prefix=$(STAGING_DIR)/usr
  43. define Build/InstallDev
  44. $(INSTALL_DIR) $(1)/usr/include
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  47. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so* $(1)/usr/lib/
  49. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libssh2.pc $(1)/usr/lib/pkgconfig/
  50. endef
  51. define Package/libssh2/install
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so* $(1)/usr/lib/
  54. endef
  55. $(eval $(call BuildPackage,libssh2))