#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

mflags=prefix=/usr mandir=/usr/share/man

override_dh_auto_configure:

override_dh_auto_build:
	dh_auto_build -- $(mflags) all

override_dh_auto_install:
	dh_auto_install -- $(mflags) install-all
	echo "Rename binaries to avoid namespace pollution and collisions"
	cd debian/scheme9/usr/bin && \
	 for f in advgen c2html cols dupes edoc htmlify scm2html scmpp soccat; do \
	  mv --verbose $$f s9$$f || true; \
	 done
