#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Ensure texlive respects DEB_TIMESTAMP
export FORCE_SOURCE_DATE = 1
# Also force "TeX output" string in dvi file, thus %DVIPSSource in the ps file
FAKETIME = TZ=UTC faketime "$(shell TZ=UTC date +"%Y-%m-%d %T" --date=@$(SOURCE_DATE_EPOCH))"

%:
	dh $@

execute_after_dh_auto_install:
ifeq (,$(findstring stage1,$(DEB_BUILD_PROFILES)))
	$(FAKETIME) $(MAKE) pdf html ps
endif
