#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. 
# GNU copyright 1997 by Joey Hess.
#
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independent
# package.

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

# This is the debhelper compatibility version to use.
export DH_COMPAT=3

PDFDIR=$(CURDIR)/debian/pgdocs-pdf
A4DIR=$(CURDIR)/debian/pgdocs-pdf-a4

clean:
	dh_testdir
	dh_testroot

	dh_clean

install: DH_OPTIONS=
install:
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/pgdocs.
	install *-US.pdf $(PDFDIR)/usr/share/doc/pgdocs-pdf
	install *-A4.pdf $(A4DIR)/usr/share/doc/pgdocs-pdf-a4
	install debian/copyright debian/README.Debian debian/pgdocs-pdf/usr/share/doc/pgdocs-pdf
	install debian/copyright debian/README.Debian debian/pgdocs-pdf-a4/usr/share/doc/pgdocs-pdf-a4

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

# Build architecture-dependent files here.
binary-arch: 
	echo No architecture-dependent binary packages

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