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.

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