#!/bin/sh
  
set -e

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

dh_autoreconf 2>&1
dh_auto_configure 2>&1

make check -C tests/hello
tests/hello/otf_hello

make check -C tests/progress
tests/progress/otf_progress hello_world.otf

patch -p1 -R < debian/patches/use_system_otf

