#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/default.mk
export CFLAGS  += $(shell getconf LFS_CFLAGS)
export LDFLAGS += $(shell getconf LFS_LDFLAGS)

%:
	dh $@

override_dh_auto_configure:
	echo '$(CC)'      > src/conf-cc
	echo '$(CC)'      > src/conf-ld
	echo '$(CFLAGS)'  > src/conf-cflags
	echo '$(LDFLAGS)' > src/conf-ldflags

override_dh_auto_build:
	make
	# This manpage is weird and seems to be more tailored to HTML
	# output, then to normal terminal one.
	sed -ri '/^.("|URL|HTML|LINE)/ d' doc/ftpcp.1

override_dh_auto_test:
	# publicfile is not in Debian main.

override_dh_auto_install:
	# Do not run make install.
