#!/usr/bin/make -f

#export DH_VERBOSE=1
export DH_COMPAT=2

D=`pwd`/debian/root-tail

build: build-stamp
build-stamp:
	dh_testdir
	$(MAKE) -f Makefile.simple root-tail
	touch build-stamp

clean: checkroot
	dh_testdir
	$(MAKE) -f Makefile.simple clean
	rm -f *-stamp
	dh_clean

install: build checkroot
	dh_testdir
	dh_clean
	dh_installdirs usr/X11R6/bin/ usr/X11R6/man/man1
	cp root-tail $D/usr/X11R6/bin/ 
	cp root-tail.1x $D/usr/X11R6/man/man1/

# Build architecture-dependent files here.
binary-arch: install checkroot
	dh_testdir
	dh_installdocs
	dh_installchangelogs
	dh_link
	dh_installman
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_builddeb

binary: binary-arch

checkroot:
	test root = "`whoami`"

.PHONY: build clean binary-arch binary install checkroot
