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.

85 lines
2.7 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. # Warning by default OpenWrt does not have a root password which is necessery for NETCONF server.
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=netopeer2
  10. PKG_VERSION:=1.1.39
  11. PKG_RELEASE:=1
  12. PKG_LICENSE:=BSD-3-Clause
  13. PKG_MAINTAINER:=Jakov Smolic <jakov.smolic@sartura.hr>
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=https://codeload.github.com/CESNET/Netopeer2/tar.gz/v$(PKG_VERSION)?
  16. PKG_HASH:=e983683eda68792fedd73af54a5c7997496091489aa921f2a9e0dd27f2f6e19a
  17. CMAKE_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/netopeer2-server
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. TITLE:=NETCONF server
  26. URL:=https://github.com/CESNET/Netopeer2
  27. DEPENDS:=+libcurl +libpthread +libyang +libnetconf2 +libsysrepo +sysrepocfg +sysrepoctl +sysrepo
  28. MENU:=1
  29. endef
  30. define Package/netopeer2-cli
  31. SECTION:=utils
  32. CATEGORY:=Utilities
  33. TITLE:=Netopeer2 cli tool
  34. URL:=https://github.com/CESNET/Netopeer2
  35. DEPENDS:=+libpthread +libyang +libnetconf2 +libopenssl
  36. endef
  37. define Package/netopeer2/description
  38. Netopeer2 is a set of tools implementing network configuration tools based on the NETCONF
  39. Protocol. This is the second generation of the toolset, originally available as the Netopeer
  40. project. Netopeer2 is based on the new generation of the NETCONF and YANG libraries -
  41. libyang and libnetconf2. The Netopeer server uses sysrepo as a NETCONF datastore implementation.
  42. endef
  43. CMAKE_OPTIONS += \
  44. -DCMAKE_INSTALL_PREFIX:PATH=/usr \
  45. -DCMAKE_BUILD_TYPE:STRING=Release \
  46. -DGENERATE_HOSTKEY:BOOL=OFF \
  47. -DINSTALL_MODULES:BOOL=OFF \
  48. -DMERGE_LISTEN_CONFIG:BOOL=OFF
  49. define Package/netopeer2-server/install
  50. $(INSTALL_DIR) $(1)/usr/bin
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/netopeer2-server $(1)/usr/bin/
  52. $(INSTALL_DIR) $(1)/etc/sysrepo/yang
  53. $(INSTALL_DIR) $(1)/etc/netopeer2/modules
  54. $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/* $(1)/etc/netopeer2/modules/
  55. $(INSTALL_DIR) $(1)/etc/uci-defaults
  56. $(INSTALL_BIN) ./files/netopeer2-server-setup.default $(1)/etc/uci-defaults/97_netopeer2-server
  57. $(INSTALL_BIN) ./files/netopeer2-server-merge-hostkey.default $(1)/etc/uci-defaults/98_netopeer2-server
  58. $(INSTALL_BIN) ./files/netopeer2-server-merge-config.default $(1)/etc/uci-defaults/99_netopeer2-server
  59. $(INSTALL_DIR) $(1)/etc/init.d/
  60. $(INSTALL_BIN) ./files/netopeer2-server.init $(1)/etc/init.d/netopeer2-server
  61. endef
  62. define Package/netopeer2-cli/install
  63. $(INSTALL_DIR) $(1)/usr/bin
  64. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/netopeer2-cli $(1)/usr/bin/
  65. endef
  66. $(eval $(call BuildPackage,netopeer2-server))
  67. $(eval $(call BuildPackage,netopeer2-cli))