#!/usr/bin/make -f

GAP=/usr/bin/gap

default:
	@uscan --no-conf --dehs --report || true

%:
	dh $@

override_dh_auto_build:
	cat debian/adhoc/makedoc.g | $(GAP) -A -q -T

override_dh_auto_test:
	echo "\
		SetPackagePath(\"factint\",\".\"); \
		LoadPackage(\"factint\"); \
		QUIT_GAP(Test(\"factint.tst\")); \
		" | $(GAP) -A -q -T

override_dh_installchangelogs:
	dh_installchangelogs --keep relnotes.txt

DEB_GAP_FACTINT_HDATADIR=$(CURDIR)/debian/gap-factint/usr/share/gap/pkg/factint/tables/brent
override_dh_compress:
	find $(DEB_GAP_FACTINT_HDATADIR) -type f -a -size +2k | xargs gzip --no-name --best
	dh_compress

get-orig-source:
	uscan --no-conf --download-current-version --compression xz --verbose
