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_MD5SUM:=b01662a210e94cccf2f76094db7dac5c
21 PKG_LICENSE_FILES:=COPYING
23 include $(INCLUDE_DIR)/package.mk
25 define Package/libssh2
29 URL:=https://www.libssh2.org/
30 DEPENDS:=+libopenssl +zlib
31 MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
34 define Package/libssh2/description
35 libssh2 is a client-side C library implementing the SSH2 protocol.
38 TARGET_CFLAGS += $(FPIC)
41 --disable-examples-build \
42 --with-libssl-prefix=$(STAGING_DIR)/usr \
43 --with-libz-prefix=$(STAGING_DIR)/usr
45 define Build/InstallDev
46 $(INSTALL_DIR) $(1)/usr/include
47 $(INSTALL_DIR) $(1)/usr/lib
48 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
49 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so* $(1)/usr/lib/
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libssh2.pc $(1)/usr/lib/pkgconfig/
54 define Package/libssh2/install
55 $(INSTALL_DIR) $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so* $(1)/usr/lib/
59 $(eval $(call BuildPackage,libssh2))