#!/usr/bin/make -f
#export DH_VERBOSE=1

# Full hardening ON
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Fixing reproducible builds
LC_ALL := C.UTF-8
export LC_ALL

# This has to be exported to make some magic below work.
export DH_OPTIONS

export LIBRARY_VERSION=6.2

%:
	dh $@

override_dh_auto_configure-arch:
	dh_auto_configure -- --enable-shared --disable-documentation

override_dh_auto_configure-indep:
	dh_auto_configure -- --enable-shared

override_dh_auto_build-indep:
	cd $(CURDIR)/doc/ && make && doxygen
	find -type f -iname "*.md5" -delete

override_dh_auto_test:
	@echo "not doing any testing"

override_dh_install:
	## cleaning up dependency_libs filed in *.la files
	sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
	dh_install

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(LIBRARY_VERSION)
