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.

86 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.225
  10. PKG_RELEASE:=$(AUTORELEASE)
  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:=1b736443d2c69b5d7a71ac412655e6edab0647b18f35f7bf504b0a24e06cb046
  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. CMAKE_BINARY_SUBDIR:=build
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../../devel/ninja/ninja-cmake.mk
  21. define Package/libyang
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=YANG data modeling language library
  25. URL:=https://github.com/CESNET/libyang
  26. DEPENDS:=+libpcre +libpthread
  27. endef
  28. define Package/libyang-cpp
  29. SECTION:=libs
  30. CATEGORY:=Libraries
  31. TITLE:=YANG data modeling C++ language library
  32. URL:=https://github.com/CESNET/libyang
  33. DEPENDS:=+libyang +libstdcpp
  34. endef
  35. define Package/yanglint
  36. SECTION:=utils
  37. CATEGORY:=Utilities
  38. TITLE:=YANG data modeling language utility
  39. URL:=https://github.com/CESNET/libyang
  40. DEPENDS:=+libyang
  41. endef
  42. define Package/libyang/description
  43. libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
  44. The library is used e.g. in libnetconf2, Netopeer2 or sysrepo projects.
  45. endef
  46. CMAKE_OPTIONS += \
  47. -DENABLE_LYD_PRIV:BOOL=ON \
  48. -DCMAKE_BUILD_TYPE:String="Release" \
  49. -DGEN_LANGUAGE_BINDINGS=ON \
  50. -DGEN_PYTHON_BINDINGS=OFF
  51. define Package/libyang/install
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyang.so* $(1)/usr/lib/
  54. $(INSTALL_DIR) $(1)/usr/lib/libyang1
  55. $(INSTALL_DIR) $(1)/usr/lib/libyang1/extensions
  56. $(INSTALL_DIR) $(1)/usr/lib/libyang1/user_types
  57. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang1/extensions/* $(1)/usr/lib/libyang1/extensions
  58. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang1/user_types/* $(1)/usr/lib/libyang1/user_types
  59. endef
  60. define Package/libyang-cpp/install
  61. $(INSTALL_DIR) $(1)/usr/lib
  62. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyang-cpp.so* $(1)/usr/lib/
  63. endef
  64. define Package/yanglint/install
  65. $(INSTALL_DIR) $(1)/usr/bin
  66. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/yanglint $(1)/usr/bin/
  67. endef
  68. $(eval $(call BuildPackage,libyang))
  69. $(eval $(call BuildPackage,libyang-cpp))
  70. $(eval $(call BuildPackage,yanglint))