2 # Copyright (C) 2015-2018 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://www.libssh2.org
/download
16 PKG_HASH
:=d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd
23 PKG_LICENSE_FILES
:=COPYING
24 PKG_CPE_ID
:=cpe
:/a
:libssh2
:libssh2
26 PKG_CONFIG_DEPENDS
:= \
27 CONFIG_LIBSSH2_MBEDTLS \
28 CONFIG_LIBSSH2_OPENSSL
30 include $(INCLUDE_DIR
)/package.mk
31 include $(INCLUDE_DIR
)/cmake.mk
33 define Package
/libssh2
37 URL
:=https
://www.libssh2.org
/
38 DEPENDS
:=+LIBSSH2_MBEDTLS
:libmbedtls
+LIBSSH2_OPENSSL
:libopenssl
+zlib
39 MAINTAINER
:=Jiri Slachta
<jiri@slachta.eu
>
42 define Package
/libssh2
/description
43 libssh2 is a client-side C library implementing the SSH2 protocol.
46 define Package
/libssh2
/config
47 source
"$(SOURCE)/Config.in"
51 -DBUILD_SHARED_LIBS
=ON \
52 -DENABLE_ZLIB_COMPRESSION
=ON \
55 ifeq ($(CONFIG_LIBSSH2_OPENSSL
),y
)
56 CMAKE_OPTIONS
+= -DCRYPTO_BACKEND
=OpenSSL
58 CMAKE_OPTIONS
+= -DCRYPTO_BACKEND
=mbedTLS
61 define Build
/InstallDev
62 $(INSTALL_DIR
) $(1)/usr
/include
63 $(INSTALL_DIR
) $(1)/usr
/lib
64 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
65 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/
66 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libssh2.so
* $(1)/usr
/lib
/
67 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libssh2.
pc $(1)/usr
/lib
/pkgconfig
/
70 define Package
/libssh2
/install
71 $(INSTALL_DIR
) $(1)/usr
/lib
72 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libssh2.so
* $(1)/usr
/lib
/
75 $(eval
$(call BuildPackage
,libssh2
))