blob: e1d6fcfb01c94b53947f8394e78b825213946ac3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/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 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
|