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.

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