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.

109 lines
3.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:=sysrepo
  9. PKG_VERSION:=2.0.53
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/sysrepo/sysrepo/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=fe09da5f40fb53e3fb97268a134cc0ed3003f0018d0d117c73e81e1553a11f30
  14. PKG_MAINTAINER:=Jakov Smolic <jakov.smolic@sartura.hr>
  15. PKG_LICENSE:=Apache-2.0
  16. PKG_LICENSE_FILES:=LICENSE
  17. CMAKE_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. define Package/libsysrepo
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=YANG-based data store library
  24. URL:=https://www.sysrepo.org/
  25. DEPENDS:=+libyang +libatomic +libprotobuf-c +libev +libredblack +librt +libpthread
  26. endef
  27. define Package/sysrepo
  28. SECTION:=utils
  29. CATEGORY:=Utilities
  30. TITLE:=YANG-based data store daemon and plugin
  31. URL:=https://www.sysrepo.org/
  32. DEPENDS:=+libsysrepo
  33. endef
  34. define Package/sysrepoctl
  35. SECTION:=utils
  36. CATEGORY:=Utilities
  37. TITLE:=sysrepo cli tool
  38. URL:=https://www.sysrepo.org/
  39. DEPENDS:=+libsysrepo
  40. endef
  41. define Package/sysrepocfg
  42. SECTION:=utils
  43. CATEGORY:=Utilities
  44. TITLE:=sysrepo configuration tool
  45. URL:=https://www.sysrepo.org/
  46. DEPENDS:=+libsysrepo
  47. endef
  48. define Package/sysrepo/description
  49. Sysrepo is an YANG-based configuration and operational state data store for Unix/Linux applications.
  50. endef
  51. CMAKE_OPTIONS += \
  52. -DENABLE_TESTS:BOOL=FALSE \
  53. -DBUILD_EXAMPLES:BOOL=FALSE \
  54. -DCMAKE_INSTALL_PREFIX=/usr \
  55. -DCMAKE_BUILD_TYPE="Package" \
  56. -DREPOSITORY_LOC:PATH=/etc/sysrepo \
  57. -DCALL_TARGET_BINS_DIRECTLY=OFF \
  58. -DGEN_LANGUAGE_BINDINGS:BOOL=TRUE
  59. define Package/libsysrepo/install
  60. $(INSTALL_DIR) $(1)/usr/lib
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysrepo.so* $(1)/usr/lib/
  62. $(INSTALL_DIR) $(1)/etc/sysrepo/yang
  63. $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-with-defaults.yang $(1)/etc/sysrepo/yang/
  64. $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf-notifications.yang $(1)/etc/sysrepo/yang/
  65. $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-netconf.yang $(1)/etc/sysrepo/yang/
  66. $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/ietf-origin.yang $(1)/etc/sysrepo/yang/
  67. $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/sysrepo.yang $(1)/etc/sysrepo/yang/
  68. $(INSTALL_DIR) $(1)/etc/uci-defaults
  69. $(INSTALL_BIN) ./files/libsysrepo.default $(1)/etc/uci-defaults/95_libsysrepo
  70. endef
  71. define Package/sysrepo/install
  72. $(INSTALL_DIR) $(1)/usr/bin
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sysrepo-plugind $(1)/usr/bin/
  74. $(INSTALL_DIR) $(1)/etc/init.d/
  75. $(INSTALL_BIN) ./files/sysrepo.init $(1)/etc/init.d/sysrepo
  76. endef
  77. define Package/sysrepoctl/install
  78. $(INSTALL_DIR) $(1)/usr/bin
  79. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sysrepoctl $(1)/usr/bin/
  80. endef
  81. define Package/sysrepocfg/install
  82. $(INSTALL_DIR) $(1)/usr/bin
  83. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sysrepocfg $(1)/usr/bin/
  84. endef
  85. $(eval $(call BuildPackage,libsysrepo))
  86. $(eval $(call BuildPackage,sysrepo))
  87. $(eval $(call BuildPackage,sysrepoctl))
  88. $(eval $(call BuildPackage,sysrepocfg))