diff options
author | Thomas F Herbert <therbert@redhat.com> | 2018-06-04 12:55:27 -0400 |
---|---|---|
committer | Thomas F Herbert <therbert@redhat.com> | 2018-06-06 15:16:50 -0400 |
commit | 66ff7c1132a7533d578882c85f9ecf2c20cc1ab3 (patch) | |
tree | e695ec7d4922f543b56ddbf0ea3510287f8d95f3 /build/build_dpdk_rpm.sh | |
parent | c0c875bb435bbaa878fc3a90ca154a93d719711c (diff) |
Build 17.11, 18.02 and 18.05
Use modified spec file from Fedora dpdk-17.11.2-1.fc28
Change-Id: Ic0ddb2405820c7b7e65cb7f517c77ecdda68090a
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
Diffstat (limited to 'build/build_dpdk_rpm.sh')
-rwxr-xr-x | build/build_dpdk_rpm.sh | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/build/build_dpdk_rpm.sh b/build/build_dpdk_rpm.sh index 4123325..f306792 100755 --- a/build/build_dpdk_rpm.sh +++ b/build/build_dpdk_rpm.sh @@ -21,14 +21,13 @@ echo executing $0 $@ echo executing on machine `uname -a` usage() { - echo "$0 -g < [master] | [tag] | [commit] > -h -k -p < URL > \ - -u < URL > -v \ - \ - -g <DPDK TAG> -- DPDK release tag commit to build. The default is \ - master. \ - -k -- Build igb_uio kernel module \ - -h -- print this message \ - -p <patch url> -- Specify url to patches if required for ovs rpm. \ + echo "$0 -g < [master] | [tag] | [commit] > -h -k -p < URL > -u < URL > -v + + -g <DPDK TAG> -- DPDK release tag commit to build. The default is + master. + -k -- Build igb_uio kernel module + -h -- print this message + -p <patch url> -- Specify url to patches if required for ovs rpm. -v -- Set verbose mode." } while getopts "g:hkp:s:u:v" opt; do @@ -94,16 +93,13 @@ mkdir -p $RPMDIR/SRPMS cd $TMPDIR -if [ ! -d dpdk ]; then - git clone $DPDK_REPO_URL - cd dpdk -else - cd dpdk +if [ -d dpdk ]; then set +e - make clean - rm *.gz + rm -rf dpdk set -e fi +git clone $DPDK_REPO_URL +cd dpdk if [[ "$DPDK_VERSION" =~ "master" ]]; then git checkout master @@ -116,7 +112,6 @@ if [[ "$DPDK_VERSION" =~ "rc" ]]; then DPDK_VERSION=`echo $DPDK_VERSION | sed -e 's/-/_/'` fi -cp $HOME/dpdk-snap/* $RPMDIR/SOURCES snapser=`git log --pretty=oneline | wc -l` makever=`make showversion` @@ -133,15 +128,9 @@ elif [ ! -z "$rc" ]; then cp $HOME/dpdk-snap/dpdk.spec $TMPDIR/dpdk/dpdk.spec else prefix=dpdk-${basever:0:5} - if [[ "$DPDK_PATCH" =~ "yes" && "$DPDK_VERSION" =~ "16.11" ]]; then - echo "----------------------------------------------" - echo "Copy applicable patches." - echo cp $TOPDIR/patches/$DPDK_VERSION/* $RPMDIR/SOURCES - cp $TOPDIR/patches/$DPDK_VERSION/* $RPMDIR/SOURCES - cp $HOME/dpdk-snap/dpdk.1611.spec $TMPDIR/dpdk/dpdk.spec - elif [[ "$DPDK_VERSION" =~ "16.07" ]]; then - cp $HOME/dpdk-snap/dpdk.1607.spec $TMPDIR/dpdk/dpdk.spec - else + if [[ "$DPDK_VERSION" =~ "18" ]]; then + cp $HOME/dpdk-snap/dpdk.1802.spec $TMPDIR/dpdk/dpdk.spec + else #1711 cp $HOME/dpdk-snap/dpdk.spec $TMPDIR/dpdk/dpdk.spec fi fi @@ -184,17 +173,17 @@ if [[ "$DPDK_VERSION" =~ "master" ]]; then else rpmbuild "${BUILD_OPT[@]}" --define "_topdir $RPMDIR" --define "_ver $DPDK_VERSION" dpdk.spec fi - # # Copy all RPMs to build directory # echo Copy all RPMs to build directory cd $RPMDIR -RPMS=$(find . -type f -iname '*.rpm') +RPMS=$(find . -type f -name '*.rpm') SRCRPMS=$(find . -type f -name '*.src.rpm') for i in $RPMS $SRCRPMS do cp $i $HOME done + exit 0 |