Skip to content

Commit

Permalink
Changes to allow RPM build with pre-built dpdk lib
Browse files Browse the repository at this point in the history
supporting RPM changes to allow vrouter dpdk package built with
pre-built dpdk library (from upstream)

Change-Id: I2fc44fcdfba56e30ab5552dab5932f920571bdf9
Closes-Jira-Bug: TFB-1446
  • Loading branch information
Prabhjot Singh Sethi committed Jun 25, 2019
1 parent 0d4ea17 commit 44a967f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -25,6 +25,10 @@ RPMBUILD_FLAGS += --define "_srcVer $(SRCVER)"
RPMBUILD_FLAGS += --define "_buildTag $(BUILDTAG)"
DEPBUILD_FLAGS :=

ifdef DPDK_BUILD_DIR
RPMBUILD_FLAGS += --define "_dpdk_build_dir $(DPDK_BUILD_DIR)"
endif

ifeq ($(ENABLEMLX),TRUE)
RPMBUILD_FLAGS += --define "_enableMellanox $(ENABLEMLX)"
DEPBUILD_FLAGS += --define "_enableMellanox $(ENABLEMLX)"
Expand Down
8 changes: 8 additions & 0 deletions rpm/contrail-vrouter-dpdk/contrail-vrouter-dpdk.spec
Expand Up @@ -33,6 +33,12 @@

%define _kernel_dir /lib/modules/%{_kVers}/build

%if 0%{?_dpdk_build_dir:1}
%define _dpdk_args --dpdk-dir=%{_dpdk_build_dir}
%else
%define _dpdk_args %{nil}
%endif


%bcond_without debuginfo

Expand Down Expand Up @@ -88,6 +94,7 @@ pushd %{_sbtop}
RTE_KERNELDIR=%{_kernel_dir} scons -c \
--opt=%{_sconsOpt} \
--kernel-dir=%{_kernel_dir} \
%{_dpdk_args} \
--root=%{_builddir} \
--add-opts=%{_sconsAddOpts} \
vrouter/dpdk
Expand All @@ -98,6 +105,7 @@ pushd %{_sbtop}
RTE_KERNELDIR=%{_kernel_dir} scons \
--opt=%{_sconsOpt} \
--kernel-dir=%{_kernel_dir} \
%{_dpdk_args} \
--root=%{_builddir} \
--add-opts=%{_sconsAddOpts} \
vrouter/dpdk
Expand Down

0 comments on commit 44a967f

Please sign in to comment.