Merge "* check out pristine tarball from git * run lintian after debuild (do not...
[ci-management.git] / jjb / deb_dpdk / include-raw-deb_dpdk-build.sh
1 #!/bin/bash
2 # basic build script example
3 set -e -o pipefail
4 # do nothing but print the current slave hostname
5 hostname
6
7 echo "cat /etc/bootstrap.sha"
8 if [ -f /etc/bootstrap.sha ];then
9     cat /etc/bootstrap.sha
10 else
11     echo "Cannot find /etc/bootstrap.sha"
12 fi
13
14 echo "cat /etc/bootstrap-functions.sha"
15 if [ -f /etc/bootstrap-functions.sha ];then
16     cat /etc/bootstrap-functions.sha
17 else
18     echo "Cannot find /etc/bootstrap-functions.sha"
19 fi
20
21 echo "sha1sum of this script: ${0}"
22 sha1sum $0
23
24 MISSING_PKGS=$(dpkg-checkbuilddeps |& perl -pe 's/^.+://g; s/\(.*?\)//g')
25
26 sudo apt-get install -y ${MISSING_PKGS} devscripts
27
28 pkg_version=$(dpkg-parsechangelog --show-field Version)
29 orig_version=$(echo ${pkg_version} | sed s'/-.*//')
30 orig_tarball="dpdk_${orig_version}.orig.tar.gz"
31 pristine-tar checkout ${orig_tarball}
32 mv ${orig_tarball} ..
33
34 debuild -uc -us -j4
35
36 # No fail on lintian errors
37 set +e
38 lintian --info --no-tag-display-limit "dpdk_${pkg_version}_source.changes"
39
40 echo "*******************************************************************"
41 echo "* DEB_DPDK BUILD SUCCESSFULLY COMPLETED"
42 echo "*******************************************************************"