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.

82 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-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:=1
  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. -DWITH_SSH1:BOOL=OFF \
  47. -DWITH_TESTING:BOOL=OFF \
  48. ifeq ($(CONFIG_BIG_ENDIAN),y)
  49. CMAKE_OPTIONS += -DWITH_BIG_ENDIAN=ON
  50. else
  51. CMAKE_OPTIONS += -DWITH_BIG_ENDIAN=OFF
  52. endif
  53. define Build/InstallDev
  54. $(INSTALL_DIR) $(1)/usr/include/libssh/
  55. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libssh/* $(1)/usr/include/libssh/
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh* $(1)/usr/lib/
  58. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  59. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  60. endef
  61. define Package/libssh/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh* $(1)/usr/lib/
  64. endef
  65. $(eval $(call BuildPackage,libssh))