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.

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