#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all # for reproducible manual export FORCE_SOURCE_DATE = 1 DEB_DESTDIR=./debian/gfan %: dh $@ override_dh_auto_install: $(MAKE) install PREFIX=$(DEB_DESTDIR)/usr override_dh_clean: dh_clean -X~ GFAN_APPS = $(shell $(DEB_DESTDIR)/usr/bin/gfan_list | grep "^gfan") MAN1DIR = usr/share/man/man1 GFAN_LINKS = $(patsubst %, $(MAN1DIR)/gfan.1 $(MAN1DIR)/%.1, $(GFAN_APPS)) override_dh_link: dh_link $(GFAN_LINKS) override_dh_install: dh_install -X~ override_dh_installchangelogs: html2text homepage/gfan.html | \ sed -n '/\*\+ Download \*\+/,/\*\+ Gfanlib \*\+/{//!p}' > \ ChangeLog dh_installchangelogs rm ChangeLog execute_before_dh_installdocs: $(MAKE) -C doc $(MAKE) -C doc # run again to fix references execute_before_dh_installman: debian/gfan.1 # for DEB_VERSION_UPSTREAM include /usr/share/dpkg/pkg-info.mk DATE := $(shell LC_ALL=C date +'%B %Y' -d @$(SOURCE_DATE_EPOCH)) debian/gfan.1: debian/gfan.1.in sed -e "s/@DATE@/$(DATE)/" \ -e "s/@VERSION@/$(DEB_VERSION_UPSTREAM)/" $< > $@