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.

88 lines
2.4 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:=libyang
  9. PKG_VERSION:=1.0.184
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/CESNET/libyang/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=1a5637451b73c4c5683837eb4c51371bb084795f653bc1a5fc20fed5541b58bc
  14. PKG_MAINTAINER:=Jakov Smolic <jakov.smolic@sartura.hr>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=LICENSE
  17. CMAKE_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. CMAKE_BINARY_SUBDIR:=build
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/libyang
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=YANG data modeling language library
  26. URL:=https://github.com/CESNET/libyang
  27. DEPENDS:=+libpcre +libpthread
  28. endef
  29. define Package/libyang-cpp
  30. SECTION:=libs
  31. CATEGORY:=Libraries
  32. TITLE:=YANG data modeling C++ language library
  33. URL:=https://github.com/CESNET/libyang
  34. DEPENDS:=+libyang +libstdcpp
  35. endef
  36. define Package/yanglint
  37. SECTION:=utils
  38. CATEGORY:=Utilities
  39. TITLE:=YANG data modeling language utility
  40. URL:=https://github.com/CESNET/libyang
  41. DEPENDS:=+libyang
  42. endef
  43. define Package/libyang/description
  44. libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
  45. The library is used e.g. in libnetconf2, Netopeer2 or sysrepo projects.
  46. endef
  47. CMAKE_OPTIONS += \
  48. -DENABLE_LYD_PRIV:BOOL=ON \
  49. -DCMAKE_BUILD_TYPE:String="Release" \
  50. -DGEN_LANGUAGE_BINDINGS=ON \
  51. -DGEN_PYTHON_BINDINGS=OFF
  52. define Package/libyang/install
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyang.so* $(1)/usr/lib/
  55. $(INSTALL_DIR) $(1)/usr/lib/libyang1
  56. $(INSTALL_DIR) $(1)/usr/lib/libyang1/extensions
  57. $(INSTALL_DIR) $(1)/usr/lib/libyang1/user_types
  58. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang1/extensions/* $(1)/usr/lib/libyang1/extensions
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang1/user_types/* $(1)/usr/lib/libyang1/user_types
  60. endef
  61. define Package/libyang-cpp/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyang-cpp.so* $(1)/usr/lib/
  64. endef
  65. define Package/yanglint/install
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/yanglint $(1)/usr/bin/
  68. endef
  69. $(eval $(call BuildPackage,libyang))
  70. $(eval $(call BuildPackage,libyang-cpp))
  71. $(eval $(call BuildPackage,yanglint))