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

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

# path to the basic package
BASE:=$(CURDIR)/debian/xfe
BASEMAN:=$(BASE)/usr/share/man

#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

%:
	dh $@


override_dh_auto_configure:
	dh_auto_configure -- --enable-sn --enable-release


override_dh_install:
	dh_install

	@echo add symlinks to some binaries:
	if test -d $(BASE); then \
	  test -f $(BASE)/usr/bin/xfa && \
	    ln -s $(BASE)/usr/bin/xfa $(BASE)/usr/bin/xfarch; \
	  test -f $(BASE)/usr/bin/xfi && \
	    ln -s $(BASE)/usr/bin/xfi $(BASE)/usr/bin/xfimage; \
	  test -f $(BASE)/usr/bin/xfp && \
	    ln -s $(BASE)/usr/bin/xfp $(BASE)/usr/bin/xfpack; \
	  test -f $(BASE)/usr/bin/xfw && \
	    ln -s $(BASE)/usr/bin/xfw $(BASE)/usr/bin/xfwrite; \
	fi
