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.

94 lines
2.5 KiB

  1. #
  2. # Copyright (C) 2020 Yousong Zhou <yszhou4tech@gmail.com>
  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. include $(INCLUDE_DIR)/kernel.mk
  9. include ../openvswitch/openvswitch.mk
  10. PKG_NAME:=ovn
  11. PKG_VERSION:=20.03.0
  12. PKG_RELEASE:=1
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_URL:=https://github.com/ovn-org/ovn.git
  15. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  16. PKG_MIRROR_HASH:=8d1cf00ce563bfeea72f5a5f86d82df07f762133b0ac7661a625b637b02e410a
  17. PKG_LICENSE:=Apache-2.0
  18. PKG_LICENSE_FILES:=LICENSE
  19. PKG_CPE_ID:=cpe:/a:openvswitch:openvswitch
  20. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  21. PKG_BUILD_DEPENDS+=python3/host python-six/host
  22. PKG_USE_MIPS16:=0
  23. PKG_BUILD_PARALLEL:=1
  24. PKG_FIXUP:=autoreconf
  25. PKG_INSTALL:=1
  26. PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
  27. include $(INCLUDE_DIR)/package.mk
  28. include ../../lang/python/python3-host.mk
  29. ovs_common_depends:= +libatomic +libunbound
  30. ovs_libovn_title:=Open vSwitch (libovn.so)
  31. ovs_libovn_hidden:=1
  32. ovs_libovn_depends:=+librt
  33. ovs_libovn_files:=usr/lib/libovn*.so*
  34. $(eval $(call OvsPackageTemplate,libovn))
  35. ovs_ovn-common_title:=Open Virtual Network (common files)
  36. ovs_ovn-common_hidden:=1
  37. ovs_ovn-common_depends:=+librt +openvswitch-common +openvswitch-libopenvswitch +openvswitch-libovn +openvswitch-libovsdb
  38. ovs_ovn-common_files:= \
  39. usr/share/ovn/scripts/ovn-ctl \
  40. usr/share/ovn/scripts/ovn-lib \
  41. $(foreach b,ovn-nbctl ovn-sbctl,usr/bin/$(b))
  42. define ovs_ovn-common_install
  43. $$(LN) /usr/share/openvswitch/scripts/ovs-ctl-wrapper $$(1)/usr/bin/ovn-ctl
  44. endef
  45. $(eval $(call OvsPackageTemplate,ovn-common))
  46. ovs_ovn-north_title:=Open Virtual Network (north package)
  47. ovs_ovn-north_hidden:=
  48. ovs_ovn-north_depends:=+openvswitch-ovsdb +openvswitch-ovn-common
  49. ovs_ovn-north_files:=\
  50. usr/share/ovn/ovn-nb.ovsschema \
  51. usr/share/ovn/ovn-sb.ovsschema \
  52. usr/bin/ovn-northd
  53. $(eval $(call OvsPackageTemplate,ovn-north))
  54. ovs_ovn-host_title:=Open Virtual Network (chassis package)
  55. ovs_ovn-host_hidden:=
  56. ovs_ovn-host_depends:=+openvswitch +openvswitch-ovn-common
  57. ovs_ovn-host_files:=usr/bin/ovn-controller
  58. $(eval $(call OvsPackageTemplate,ovn-host))
  59. CONFIGURE_ARGS+= \
  60. --enable-ndebug \
  61. --enable-shared \
  62. --disable-libcapng \
  63. --disable-silent-rules \
  64. --with-ovs-source=$(ovs_builddir) \
  65. --with-ovs-build=$(ovs_builddir) \
  66. CONFIGURE_VARS += \
  67. ovs_cv_flake8=no \
  68. ovs_cv_sphinx=no \
  69. ovs_cv_python3=$(HOST_PYTHON3_BIN) \
  70. TARGET_CFLAGS += -flto -std=gnu99
  71. MAKE_VARS += PYTHONPATH="$(HOST_PYTHON3PATH)"
  72. $(foreach p,$(ovs_packages),\
  73. $(eval $(call BuildPackage,$(p)))\
  74. )