#!/bin/sh

set -e

trap "patch -p1 -R < debian/tests-patches/use_system_liblouisutdml" 0

patch -p1 < debian/tests-patches/use_system_liblouisutdml 2>&1 || true

dh_autoreconf 2>&1
dh_auto_configure -- --disable-java-bindings 2>&1

make -C gnulib 2>&1
make -C tests 2>&1
make check -C tests || ( cat tests/test-suite.log ; false )
