Merge pull request #8361 from jandelgado/add_udptunnel_package
[feed/packages.git] / libs / libssh2 / Makefile
1 #
2 # Copyright (C) 2015-2018 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libssh2
11 PKG_VERSION:=1.8.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://www.libssh2.org/download
16 PKG_HASH:=088307d9f6b6c4b8c13f34602e8ff65d21c2dc4d55284dfe15d502c4ee190d67
17
18 PKG_FIXUP:=autoreconf
19
20 PKG_INSTALL:=1
21
22 PKG_LICENSE:=BSD
23 PKG_LICENSE_FILES:=COPYING
24 PKG_CPE_ID:=cpe:/a:libssh2:libssh2
25
26 PKG_CONFIG_DEPENDS:= \
27 CONFIG_LIBSSH2_MBEDTLS \
28 CONFIG_LIBSSH2_OPENSSL
29
30 include $(INCLUDE_DIR)/package.mk
31
32 define Package/libssh2
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=SSH2 library
36 URL:=https://www.libssh2.org/
37 DEPENDS:=+LIBSSH2_MBEDTLS:libmbedtls +LIBSSH2_OPENSSL:libopenssl +zlib
38 MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
39 endef
40
41 define Package/libssh2/description
42 libssh2 is a client-side C library implementing the SSH2 protocol.
43 endef
44
45 define Package/libssh2/config
46 source "$(SOURCE)/Config.in"
47 endef
48
49 CONFIGURE_ARGS += \
50 --disable-examples-build \
51 --disable-silent-rules \
52 $(if $(CONFIG_LIBSSH2_MBEDTLS),--with-mbedtls --with-libmbedtls-prefix=$(STAGING_DIR)/usr) \
53 $(if $(CONFIG_LIBSSH2_OPENSSL),--with-openssl --with-libssl-prefix=$(STAGING_DIR)/usr) \
54 --with-libz-prefix=$(STAGING_DIR)/usr
55
56 define Build/InstallDev
57 $(INSTALL_DIR) $(1)/usr/include
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
60 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so* $(1)/usr/lib/
62 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libssh2.pc $(1)/usr/lib/pkgconfig/
63 endef
64
65 define Package/libssh2/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so* $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,libssh2))