#!/usr/bin/make -f
# $Id:$
# Copyright (c) 1998 Philip Hands <phil@hands.com>
# Distributable under the GPL
# based on the sample by Joey Hess, from debhelper

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

build:
	dh_testdir
	touch build

clean:
	dh_testdir
	dh_testroot
	dh_clean

binary-indep:	build
#       dh_testversion
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	cp -r prototype/* debian/tmp
	find debian/tmp -name \*,v -exec rm {} \;

	chmod 755 debian/tmp/usr/bin/debian-test
	find debian/tmp/usr/lib/debian-test/*tests -type f \
		-exec chmod 755 {} \;

	dh_installdocs 
	dh_installexamples
	dh_installchangelogs 
	dh_installmenu
	dh_installcron
	dh_installmanpages -pdebian-test
	dh_movefiles
	dh_compress
	dh_fixperms
	dh_suidregister
	dh_gencontrol
	dh_installdeb
	dh_md5sums
	dh_builddeb

binary-arch:	checkroot build
	$(checkdir)
# There are no architecture-dependent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

checkroot:
	$(checkdir)
	test root = "`whoami`"

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