#!/usr/bin/make -f

#DH_VERBOSE = 1
include /usr/share/dpkg/default.mk

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
	mkdir -p $(CURDIR)/debian/$(DEB_SOURCE)/usr/share/man/man1
	for command in $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin/*; \
	do \
		if [ $$(basename $$command) != daligner ] ; \
		then \
			ln -s daligner.1 \
			$(CURDIR)/debian/$(DEB_SOURCE)/usr/share/man/man1/$$(basename $$command).1 ; \
		fi; \
	done