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.

95 lines
2.6 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.06.1
  12. PKG_RELEASE:=3
  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:=046002c271fd29c496be53b5673a7ede6f381343bef49732e9bd17ed1454940e
  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_libovn_title:=Open vSwitch (libovn.so)
  30. ovs_libovn_hidden:=1
  31. ovs_libovn_depends+=+libatomic
  32. ovs_libovn_files:=usr/lib/libovn*.so*
  33. $(eval $(call OvsPackageTemplate,libovn))
  34. ovs_ovn-common_title:=Open Virtual Network (common files)
  35. ovs_ovn-common_hidden:=1
  36. ovs_ovn-common_depends:=+openvswitch-common +openvswitch-libopenvswitch +openvswitch-libovn +openvswitch-libovsdb
  37. ovs_ovn-common_depends+=+libatomic
  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_depends+=+libatomic
  50. ovs_ovn-north_files:=\
  51. usr/share/ovn/ovn-nb.ovsschema \
  52. usr/share/ovn/ovn-sb.ovsschema \
  53. usr/bin/ovn-northd
  54. $(eval $(call OvsPackageTemplate,ovn-north))
  55. ovs_ovn-host_title:=Open Virtual Network (chassis package)
  56. ovs_ovn-host_hidden:=
  57. ovs_ovn-host_depends:=+openvswitch +openvswitch-ovn-common
  58. ovs_ovn-host_depends+=+libatomic
  59. ovs_ovn-host_files:=usr/bin/ovn-controller
  60. $(eval $(call OvsPackageTemplate,ovn-host))
  61. CONFIGURE_ARGS+= \
  62. --enable-ndebug \
  63. --enable-shared \
  64. --disable-libcapng \
  65. --disable-silent-rules \
  66. --with-ovs-source=$(ovs_builddir) \
  67. --with-ovs-build=$(ovs_builddir) \
  68. CONFIGURE_VARS += \
  69. ovs_cv_flake8=no \
  70. ovs_cv_sphinx=no \
  71. ovs_cv_python3=$(HOST_PYTHON3_BIN) \
  72. TARGET_CFLAGS += -flto -std=gnu99
  73. MAKE_VARS += PYTHONPATH="$(HOST_PYTHON3PATH)"
  74. $(foreach p,$(ovs_packages),\
  75. $(eval $(call BuildPackage,$(p)))\
  76. )