#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

%:
	dh $@ --buildsystem cargo

override_dh_auto_clean:
	dh_auto_clean
	-rm $(CURDIR)/debian/riff.1

override_dh_auto_install:
	sed -e "s/@VERSION@/$(DEB_VERSION_UPSTREAM)/g" -e "s/@DATE@/$(shell LANG="en" date --utc --date="@$(SOURCE_DATE_EPOCH)" +'%B %Y')/g" $(CURDIR)/debian/riff.1.in > $(CURDIR)/debian/riff.1
	dh_auto_install

