#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_build-indep:
	# nothing to do here

override_dh_auto_test-indep:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	echo "Do not run build time test"
endif

override_dh_auto_install-arch:
	dh_auto_install -a
	rm -rf debian/tmp/usr/lib/pkgconfig
	rm -f debian/tmp/usr/lib/*/libclustalo.la
	mv debian/tmp/usr/include debian/libclustalo-dev/usr
	mv debian/tmp/usr/lib debian/libclustalo-dev/usr
	mv debian/tmp/usr/bin debian/clustalo/usr

override_dh_auto_install-indep:
	# Generate doxygen doc
	mkdir -p doc
	doxygen Doxyfile
	find doc -name "*.md5" -delete

override_dh_clean:
	dh_clean
	rm -f  _configs.sed
	rm -rf doc
