#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

#export DH_VERBOSE=1

configure: configure-stamp
configure-stamp:
	dh_testdir
	perl Makefile.PL INSTALLDIRS=vendor	
	touch $@

build: configure-stamp build-stamp
build-stamp:
	dh_testdir
	$(MAKE)
	TEST_SHARED_MEMORY=1 $(MAKE) test
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	[ ! -f Makefile ] || $(MAKE) -i distclean
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	$(MAKE) install DESTDIR=$(CURDIR)/debian/libhtml-template-perl
	rm -rfv $(CURDIR)/debian/libhtml-template-perl/usr/lib

binary-arch: build install
# We have nothing to do.

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installman
	dh_installchangelogs Changes
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_perl
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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