vpp/build-root/scripts/make-plugin-toolkit
Ed Warnicke cb9cadad57 Initial commit of vpp code.
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2015-12-08 15:47:27 -07:00

41 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -eux
build_tarball() {
for dir in vppinfra dpdk svm vlib-api vlib vnet vpp vpp-api-test
do
tar -C install-$1/$dir/include -cf - . | tar -C $tmp_dir/include -xf -
done
tar -C ../sample-plugin -cf - . \
| tar -C $tmp_dir/src/sample-plugin -xf -
cp tools/bin/vppapigen $tmp_dir/tools/bin
echo Created by `id -u -n` on `hostname` at `date` > \
$tmp_dir/toolkit-version-stamp
cp scripts/vpp-plugin-toolkit-readme $tmp_dir/README
tar -C $tmp_dir -zcf $PWD/vpp-plugin-toolkit-$1.tar.gz .
}
if [ `basename $PWD` != "build-root" ] ; then
echo Please run this script from build-root
exit 1
fi
echo Pull additional tookit repos
make PLATFORM=vpp sample-plugin-find-source
make PLATFORM=vpp TAG=vpp wipe-all
echo Build vpp forwarder production package
make PLATFORM=vpp TAG=vpp V=0 strip_sumbols=yes install-packages
tmp_dir="`mktemp -d /tmp/plugin-XXXXXX`"
trap "rm -rf $tmp_dir" err
echo Create vpp forwarder production plugin toolkit tarball
mkdir -p $tmp_dir/tools/bin $tmp_dir/include $tmp_dir/lib64 \
$tmp_dir/src/sample-plugin
build_tarball vpp-native
rm -rf $tmp_dir
exit 0