openvswitch: openvswitch.mk: add ovs_common_depends variable
[feed/packages.git] / net / openvswitch / openvswitch.mk
1 # Copyright (C) 2020 Yousong Zhou <yszhou4tech@gmail.com>
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5
6 # Versions
7
8 ovs_version:=2.13.0
9 ovs_builddir=$(KERNEL_BUILD_DIR)/openvswitch-$(ovs_version)
10
11 # Shared vars, macros
12
13 ovs_common_depends:=
14 ovs_packages:=
15
16 ovs_package_name=$(if $(filter openvswitch,$(1)),openvswitch,openvswitch-$(1))
17 define OvsPackageTemplate
18 define Package/$(call ovs_package_name,$(1))
19 SECTION:=net
20 SUBMENU:=Open vSwitch
21 CATEGORY:=Network
22 URL:=https://www.openvswitch.org
23 TITLE:=$(ovs_$(1)_title)
24 HIDDEN:=$(ovs_$(1)_hidden)
25 DEPENDS:=$(ovs_$(1)_depends) $(ovs_common_depends)
26 endef
27
28 define Package/$(call ovs_package_name,$(1))/install
29 $(foreach f,$(ovs_$(1)_files),
30 $(INSTALL_DIR) $$(1)/$(dir $(f))
31 $(CP) $(PKG_INSTALL_DIR)/$(f) $$(1)/$(dir $(f))
32 )
33 $(ovs_$(1)_install)
34 endef
35
36 ovs_packages+=$(call ovs_package_name,$(1))
37 endef