You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.3 KiB

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