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