#!/usr/bin/make -f
#
# Invoke each target with `./debian/rules <target>'.  All targets should be
# invoked with the package root as the current directory.

# The name of the package
P = doc-html-w3

R = debian/tmp

DIRECTORIES = \
        $(R) \
        $(R)/DEBIAN \
        $(R)/usr \
        $(R)/usr/share/doc/$(P) 

$(DIRECTORIES):
	install -d -g root -o root -m 755 $@
	chmod g-s $@

# Builds the binary package.
build:
	dh_testdir
	touch build

# Clean $(DIRECTORIES)
clean-dir:
	dh_testdir
	dh_clean

# Undoes the effect of `make -f rules build'.
clean: clean-dir
	dh_testdir
	[ ! -f Makefile ] || make distclean cleanconfig
	rm -f debian/files* debian/substvars core debian/*~ *~ 
	rm -f build

# Makes a binary package.
binary-indep: $(DIRECTORIES) build
	dh_testroot
	dh_testdir

binary-arch: $(DIRECTORIES) build
	dh_testroot
	dh_testdir

	dh_installdirs
	dh_installdocs
	dh_installchangelogs
	gzip -9v $(R)/usr/share/doc/$(P)/changelog.Debian
	dh_movefiles
	dh_fixperms
	dh_gencontrol
	dh_installdeb
	dh_md5sums
	dh_builddeb

binary:		binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean
