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