#!/usr/bin/make -f

build: build-stamp
build-stamp:
	dh_testdir
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-rm -f build-stamp
	rm -rf .pc
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdirs -A
	cp pgfouine.php debian/pgfouine/usr/bin/pgfouine
	cp pgfouine_vacuum.php debian/pgfouine/usr/bin/pgfouine_vacuum
	dh_install -A
	# Remove geshi from upstream because we use the one in Debian
	rm -rf debian/pgfouine/usr/share/pgfouine/include/reporting/geshi
	rm -rf debian/pgfouine/usr/share/pgfouine/include/reporting/artichow/font
	dh_installman -A debian/pgfouine.1
	dh_installman -A debian/pgfouine_vacuum.1
	dh_installchangelogs -A ChangeLog
	dh_installdocs -A
	dh_compress -A
	dh_fixperms -A
	dh_installdeb -A
	dh_gencontrol -A
	dh_md5sums -A
	dh_builddeb -A

binary-arch:
	#Nothing to be done here.

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