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.

69 lines
1.9 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-r4
  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:=411f0c675b0858f8deabc0545e33fbd791ff7c7a5b7d2c27e347e3973d5b8ae4
  14. PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@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/yanglint
  30. SECTION:=utils
  31. CATEGORY:=Utilities
  32. TITLE:=YANG data modeling language utility
  33. URL:=https://github.com/CESNET/libyang
  34. DEPENDS:=+libyang
  35. endef
  36. define Package/libyang/description
  37. libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
  38. The library is used e.g. in libnetconf2, Netopeer2 or sysrepo projects.
  39. endef
  40. CMAKE_OPTIONS += -DENABLE_LYD_PRIV:BOOL=ON
  41. define Package/libyang/install
  42. $(INSTALL_DIR) $(1)/usr/lib
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyang.so* $(1)/usr/lib/
  44. $(INSTALL_DIR) $(1)/usr/lib/libyang
  45. $(INSTALL_DIR) $(1)/usr/lib/libyang/extensions
  46. $(INSTALL_DIR) $(1)/usr/lib/libyang/user_types
  47. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang/extensions/* $(1)/usr/lib/libyang/extensions
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyang/user_types/* $(1)/usr/lib/libyang/user_types
  49. endef
  50. define Package/yanglint/install
  51. $(INSTALL_DIR) $(1)/usr/bin
  52. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/yanglint $(1)/usr/bin/
  53. endef
  54. $(eval $(call BuildPackage,libyang))
  55. $(eval $(call BuildPackage,yanglint))