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
2.0 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.5
  12. PKG_RELEASE:=2
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_URL:=https://red.libssh.org/attachments/download/218/
  15. PKG_HASH:=54e86dd5dc20e5367e58f3caab337ce37675f863f80df85b6b1614966a337095
  16. CMAKE_INSTALL:=1
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=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 @BROKEN
  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. -DCMAKE_INSTALL_PREFIX:PATH=/usr \
  35. -DCMAKE_BUILD_TYPE:STRING=Release \
  36. -DHAVE_STRTOULL=1 \
  37. -DHAVE_GETADDRINFO=1 \
  38. -DHAVE_TERMIOS_H=1 \
  39. -DWITH_EXAMPLES:BOOL=OFF \
  40. -DWITH_GCRYPT:BOOL=OFF \
  41. -DWITH_GSSAPI:BOOL=OFF \
  42. -DWITH_LIBZ:BOOL=ON \
  43. -DWITH_NACL:BOOL=OFF \
  44. -DWITH_PCAP:BOOL=OFF \
  45. -DWITH_SERVER:BOOL=ON \
  46. -DWITH_SFTP:BOOL=ON \
  47. -DWITH_SSH1:BOOL=OFF \
  48. -DWITH_TESTING:BOOL=OFF \
  49. ifeq ($(CONFIG_BIG_ENDIAN),y)
  50. CMAKE_OPTIONS += -DWITH_BIG_ENDIAN=ON
  51. else
  52. CMAKE_OPTIONS += -DWITH_BIG_ENDIAN=OFF
  53. endif
  54. define Build/InstallDev
  55. $(INSTALL_DIR) $(1)/usr/include/libssh/
  56. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libssh/* $(1)/usr/include/libssh/
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh* $(1)/usr/lib/
  59. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  60. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  61. endef
  62. define Package/libssh/install
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh* $(1)/usr/lib/
  65. endef
  66. $(eval $(call BuildPackage,libssh))