#!/usr/bin/make -f
# Copyright 2018 Bill Allombert <ballombe@debian.org>

export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog -SDate)" +%s)
export FORCE_SOURCE_DATE=1
export LC_ALL = C

build-indep-stamp:
	#make -C doc && touch build-indep-stamp
	rm -f doc/._manual.pdf
build-indep: build-indep-stamp
build-arch:
build: build-indep

clean:
	dh_testdir
	dh_testroot
	#make -C doc clean
	rm -f build-indep-stamp
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	dh_install *.g data lib doc htm usr/share/gap/pkg/TransGrp
	#make -C doc install DESTDIR=../debian/gap-transgrp
binary-arch: build-arch
binary-indep: build-indep install
	dh_testdir
	dh_testroot
	dh_installdocs README.txt LICENSE
	dh_installexamples
	dh_installchangelogs
	dh_link
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
