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.

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