blob: 14e9eda26fe99fc971c7c080d4303bf974adf826 [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
29make PLATFORM=vpp TAG=vpp V=0 strip_sumbols=yes install-packages
30
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