Fresh pull from upstream (stable) package feed
[librecmc/package-feed.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.7.0
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://www.libssh2.org/download
16 PKG_MD5SUM:=b01662a210e94cccf2f76094db7dac5c
17
18 PKG_INSTALL:=1
19
20 PKG_LICENSE:=BSD
21 PKG_LICENSE_FILES:=COPYING
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libssh2
26   SECTION:=libs
27   CATEGORY:=Libraries
28   TITLE:=SSH2 library
29   URL:=https://www.libssh2.org/
30   DEPENDS:=+libopenssl +zlib
31   MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
32 endef
33
34 define Package/libssh2/description
35  libssh2 is a client-side C library implementing the SSH2 protocol.
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39
40 CONFIGURE_ARGS += \
41         --disable-examples-build \
42         --with-libssl-prefix=$(STAGING_DIR)/usr \
43         --with-libz-prefix=$(STAGING_DIR)/usr
44
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/
52 endef
53
54 define Package/libssh2/install
55         $(INSTALL_DIR) $(1)/usr/lib
56         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libssh2.so* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,libssh2))