#!/bin/sh
set -e

# Building curl is required because libauthretry (from "make test") requires
# libcurl.
#
# It might be possible to patch the makefile to have libauthretry link against
# the system's installed libcurl, patches welcome.
#
# openssl tests run against the built curl and libcurl rather than the installed
# one as we don't ship a curl linked against openssl (only openssl libraries).

export DEB_BUILD_PROFILES="pkg.curl.openssl-only"
export VERBOSE=1

# Don't skip tests which fail on ipv6-only environments for autopkgtests.
# I'm not aware of runners with this configuration for debci, and a retry
# should be easy enough it it happens.
# References:
# https://bugs.debian.org/1032343
# https://github.com/curl/curl/issues/10682
export TESTS_FAILS_ON_IPV6_ONLY_MACHINES=""

echo "dh_update_autotools_config"
dh_update_autotools_config

echo "dh_autoreconf"
dh_autoreconf

echo "debian/rules override_dh_auto_configure "
debian/rules override_dh_auto_configure

echo "debian/rules override_dh_auto_build"
debian/rules override_dh_auto_build

echo "debian/rules override_dh_auto_test"
debian/rules override_dh_auto_test

