#!/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=4.0

%:
	dh $@ --with autoreconf

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

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

override_dh_auto_build-indep:
	cd $(CURDIR)/doc/ && make && doxygen

override_dh_auto_test:
	@echo "not doing any testing"

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

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(LIBRARY_VERSION)
