blob: e1d6fcfb01c94b53947f8394e78b825213946ac3 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001#!/bin/bash
2
3set -eux
4
5build_tarball() {
6 for dir in vppinfra dpdk svm vlib-api vlib vnet vpp vpp-api-test
7 do
8 tar -C install-$1/$dir/include -cf - . | tar -C $tmp_dir/include -xf -
9 done
10 tar -C ../sample-plugin -cf - . \
11 | tar -C $tmp_dir/src/sample-plugin -xf -
12 cp tools/bin/vppapigen $tmp_dir/tools/bin
13 echo Created by `id -u -n` on `hostname` at `date` > \
14 $tmp_dir/toolkit-version-stamp
15 cp scripts/vpp-plugin-toolkit-readme $tmp_dir/README
16 tar -C $tmp_dir -zcf $PWD/vpp-plugin-toolkit-$1.tar.gz .
17}
18
19if [ `basename $PWD` != "build-root" ] ; then
20 echo Please run this script from build-root
21 exit 1
22fi
23
24echo Pull additional tookit repos
25make PLATFORM=vpp sample-plugin-find-source
26
27make PLATFORM=vpp TAG=vpp wipe-all
28echo Build vpp forwarder production package
Damjan Marion6b1d7c52016-04-26 18:19:47 +020029make PLATFORM=vpp TAG=vpp strip_sumbols=yes install-packages
Ed Warnickecb9cada2015-12-08 15:45:58 -070030
31tmp_dir="`mktemp -d /tmp/plugin-XXXXXX`"
32trap "rm -rf $tmp_dir" err
33
34echo Create vpp forwarder production plugin toolkit tarball
35mkdir -p $tmp_dir/tools/bin $tmp_dir/include $tmp_dir/lib64 \
36 $tmp_dir/src/sample-plugin
37build_tarball vpp-native
38rm -rf $tmp_dir
39
40exit 0