#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

package=ivtools-doc

version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')

build:
	$(checkdir)
	install -d debian/tmp/usr/doc/ivtools-doc
	cp *.gz debian/tmp/usr/doc/ivtools-doc
	touch build

clean:
	$(checkdir)
	-rm -r debian/tmp
	-rm build

binary-indep:	checkroot build
	$(checkdir)

	debstd -c
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep

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

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