Merge pull request #4240 from sartura/jq_add_package
[feed/packages.git] / libs / libnetconf2 / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libnetconf2
11
12 PKG_LICENSE:=BSD-3-Clause
13 PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
14
15 PKG_VERSION:=0.8.56
16
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_VERSION:=4d13eca938085298edbad6a731d77dfd55c8d514
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
20 PKG_SOURCE_URL:=https://github.com/cesnet/libnetconf2/
21 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
22
23 PKG_BUILD_ROOT:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
24 PKG_BUILD_DIR:=$(PKG_BUILD_ROOT)
25
26 PKG_BUILD_PARALLEL:=1
27 PKG_INSTALL:=1
28
29 CMAKE_INSTALL:=1
30
31 include $(INCLUDE_DIR)/package.mk
32 include $(INCLUDE_DIR)/cmake.mk
33
34 define Package/libnetconf2
35 SECTION:=libs
36 CATEGORY:=Libraries
37 TITLE:=NETCONF library
38 URL:=$(PKG_SOURCE_URL)
39 DEPENDS:= +libyang +libssh +libopenssl
40 endef
41
42 define Package/libnetconf2/description
43 libnetconf2 is the NETCONF library in C intended for building NETCONF clients and servers.
44
45 libnetconf2 provides basic functions to connect NETCONF client and server to each other via
46 SSH, to send and receive NETCONF messages. NETCONF datastore implementation is not included.
47 endef
48
49 CMAKE_OPTIONS += \
50 -DCMAKE_INSTALL_PREFIX:PATH=/usr \
51 -DCMAKE_BUILD_TYPE:STRING=Release
52
53 define Build/InstallDev
54 $(INSTALL_DIR) $(1)/usr/include/libnetconf2
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/libnetconf2/*.h $(1)/usr/include/libnetconf2/
56 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
57
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/
60
61 $(INSTALL_DIR) $(1)/usr/include/libnetconf2
62 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/libnetconf2/* $(1)/usr/include/libnetconf2/
63
64 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
65 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetconf2.pc $(1)/usr/lib/pkgconfig/
66 endef
67
68 define Package/libnetconf2/install
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/
71
72 $(INSTALL_DIR) $(1)/usr/share/libnetconf2
73 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libnetconf2/*.yin $(1)/usr/share/libnetconf2/
74 endef
75
76 $(eval $(call BuildPackage,libnetconf2))