include-raw-deb_dpdk-build.sh revision a45e3ceb
1#!/bin/bash
2
3set -e -o pipefail
4
5# print the current slave hostname
6hostname
7
8for hashfile in bootstrap.sha bootstrap-functions.sha
9do
10    echo -n "${hashfile}: "
11    if [ -f /etc/${hashfile} ];then
12        cat /etc/${hashfile}
13    else
14        echo "Cannot find ${hashfile}"
15    fi
16done
17
18echo "sha1sum of script [${0}]: " $(sha1sum $0)
19
20MISSING_PKGS=$(dpkg-checkbuilddeps |& perl -pe 's/^.+://g; s/\(.*?\)//g; s/\|\s+\S+//g;')
21MISSING_PKGS="devscripts pristine-tar ${MISSING_PKGS}"
22
23if [ -n "${MISSING_PKGS}" ]
24then
25    echo "*******************************************************************"
26    echo "* ADD MISSING DEPENDENCIES TO RESPIN SCRIPT:"
27    echo "${MISSING_PKGS}"
28    echo "*******************************************************************"
29fi
30
31sudo apt-get update
32sudo apt-get install -y ${MISSING_PKGS}
33
34pkg_version=$(dpkg-parsechangelog --show-field Version)
35orig_version=$(echo ${pkg_version} | perl -pe 's/-.+$//; s/~/-/') # remove debian suffix, replace ~rc1 with -rc1, for instance
36orig_tarball=$(git ls-tree remotes/origin/pristine-tar | perl -ne "print /(dpdk_${orig_version}.orig.+).id/")
37
38pristine-tar checkout ${orig_tarball}
39mv ${orig_tarball} ..
40
41debuild -uc -us -j4
42
43# No fail on lintian errors
44set +e
45lintian --info --no-tag-display-limit "dpdk_${pkg_version}_source.changes"
46
47echo "*******************************************************************"
48echo "* DEB_DPDK BUILD SUCCESSFULLY COMPLETED"
49echo "*******************************************************************"
50