#!/usr/bin/make -f
include /usr/share/quilt/quilt.make

# build: $(QUILT_STAMPFN) build-stamp
build: build-stamp
build-stamp: 
	dh_testdir
	touch $@

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs
	dh_installkpatches
	# Hack needed until dh-kpatches is updated.
	sed <debian/linux-patch-tuxonice/usr/share/doc/linux-patch-tuxonice/README-kernelpatch.Debian '/such patches.  For generic instructions on using those patches, see/d; /make-kpkg(8), its --added-patches option, and its PATCH_THE_KERNEL/d; s/environment variable./such patches./ ' >debian/linux-patch-tuxonice/usr/share/doc/linux-patch-tuxonice/README-kernelpatch.Debian.tmp
	mv debian/linux-patch-tuxonice/usr/share/doc/linux-patch-tuxonice/README-kernelpatch.Debian.tmp debian/linux-patch-tuxonice/usr/share/doc/linux-patch-tuxonice/README-kernelpatch.Debian

binary-arch:
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installchangelogs 
	dh_compress
	dh_fixperms
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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