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.

81 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2017 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_LICENSE:=LGPL-2.1+ BSD-2-Clause
  9. PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
  10. PKG_NAME:=libssh
  11. PKG_VERSION:=0.7.6
  12. PKG_RELEASE:=1
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_URL:=https://www.libssh.org/files/0.7/
  15. PKG_HASH:=1d607d3859274f755942324afb0f887ee22edd157f9596a2e69e3a28ec6d1092
  16. PKG_CPE_ID:=cpe:/a:libssh:libssh
  17. CMAKE_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_USE_MIPS16:=0
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/libssh
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. URL:=$(PKG_SOURCE_URL)
  26. TITLE:=SSH library
  27. DEPENDS:=+libpthread +librt +zlib +libopenssl
  28. endef
  29. define Package/libssh/description
  30. libssh is a mulitplatform C library implementing the SSHv2 and SSHv1 protocol
  31. for client and server implementations.
  32. endef
  33. CMAKE_OPTIONS = \
  34. -DHAVE_STRTOULL=1 \
  35. -DHAVE_GETADDRINFO=1 \
  36. -DHAVE_TERMIOS_H=1 \
  37. -DWITH_EXAMPLES:BOOL=OFF \
  38. -DWITH_GCRYPT:BOOL=OFF \
  39. -DWITH_GSSAPI:BOOL=OFF \
  40. -DWITH_LIBZ:BOOL=ON \
  41. -DWITH_NACL:BOOL=OFF \
  42. -DWITH_PCAP:BOOL=OFF \
  43. -DWITH_SERVER:BOOL=ON \
  44. -DWITH_SFTP:BOOL=ON \
  45. -DWITH_SSH1:BOOL=OFF \
  46. -DWITH_TESTING:BOOL=OFF \
  47. ifeq ($(CONFIG_BIG_ENDIAN),y)
  48. CMAKE_OPTIONS += -DWITH_BIG_ENDIAN=ON
  49. else
  50. CMAKE_OPTIONS += -DWITH_BIG_ENDIAN=OFF
  51. endif
  52. define Build/InstallDev
  53. $(INSTALL_DIR) $(1)/usr/include/libssh/
  54. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libssh/* $(1)/usr/include/libssh/
  55. $(INSTALL_DIR) $(1)/usr/lib
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh* $(1)/usr/lib/
  57. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  58. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  59. endef
  60. define Package/libssh/install
  61. $(INSTALL_DIR) $(1)/usr/lib
  62. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh* $(1)/usr/lib/
  63. endef
  64. $(eval $(call BuildPackage,libssh))