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
|
#!/bin/sh
# run upstream's unit tests with Debian-supplied dependencies
# FIXME: right now this fails hard because many prerequisites are only
# handled in `make test`
set -e
set -u
set -x
BUILD_DIR="${PWD}/_build"
DH_OPTIONS="-O--buildsystem=golang -O--builddirectory=$BUILD_DIR"
APTLY_DIR="${BUILD_DIR}/src/github.com/aptly-dev/aptly"
dpkg-source --before-build .
dh_update_autotools_config $DH_OPTIONS
dh_autoreconf $DH_OPTIONS
dh_auto_configure $DH_OPTIONS
dpkg-parsechangelog --show-field Version | perl -pe 's/\n//' >| ${APTLY_DIR}/VERSION
find . -name VERSION
mkdir -p ${APTLY_DIR}/debian
cp debian/aptly.conf ${APTLY_DIR}/debian/
dh_auto_build $DH_OPTIONS
export PATH=${BUILD_DIR}/bin:$PATH
dh_auto_test $DH_OPTIONS --no-parallel
|