#!/usr/bin/make -f
# debian/rule for gap-tomlib
# GNU copyright 2003 by Bill Allombert
# Based on a sample by
# GNU copyright 1997 by Joey Hess.

# Uncomment this to turn on verbose mode. 
#export DH_VERBOSE=1

build-arch: 
build-indep:
	make -C doc gapdoc
	rm -f doc/tomlib.brf doc/tomlib.out  doc/bib.xml.bib 
build: build-arch build-indep

clean:
	dh_testdir
	dh_testroot
	rm -f build-arch-stamp build-indep-stamp configure-stamp
	make -C doc spotless
	dh_clean

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	dh_install -X debian . usr/share/gap/pkg/tomlib
	chmod a-x debian/gap-table-of-marks/usr/share/gap/pkg/tomlib/doc/*
	gzip -r --best debian/gap-table-of-marks/usr/share/gap/pkg/tomlib/data/

# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i 
	dh_installchangelogs  -i
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

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