#! /usr/bin/make -f

package        := context-doc-nonfree
instbase       := debian/$(package)

build: build-indep

build-indep: build-indep-stamp
build-arch: build-indep-stamp

build-indep-stamp:
	touch build-indep-stamp

clean:
	dh_testroot
	rm -f build-indep-stamp
	dh_clean

binary-indep: build-indep
	dh_testdir 
	dh_testroot
	dh_clean
	dh_installdirs usr/share/doc/$(package) \
		usr/share/texmf/doc/context/
	cp -a base $(instbase)/usr/share/texmf/doc/context/
	dh_installdocs
	dh_installchangelogs
	dh_compress -X.pdf
	dh_installtex
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch:
# We have nothing to do here but the Debian Policy says this target must
# exist.

binary: binary-indep binary-arch

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