#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- STRIP=/bin/true
	cat $(CURDIR)/README.md | iconv -f latin1 -t utf8 > $(CURDIR)/README.md

override_dh_install:
	dh_install
	chmod -x $(CURDIR)/debian/libhdhomerun-dev/usr/include/libhdhomerun/*.h

get-orig-changelog:
	w3m -dump https://www.silicondust.com/support/hdhomerun/downloads/software-changelog/ | tail -n +35 | head -n -22 > ChangeLog