#! /usr/bin/make -f
####################
# GNU copyright 1997 to 1999 by Joey Hess.

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

# This is the debhelper compatability version to use.
export DH_COMPAT=3

patches:=$(wildcard lkcd-*.patch)
tmp:=`pwd`/debian/kernel-patch-lkcd

arch=$(shell dpkg --print-architecture)

topdir=$(shell pwd)

build:
	dh_testdir

clean:
	dh_testdir
	dh_testroot
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	dh_installkpatches

binary-arch: build

binary-indep: build  install
	dh_testdir
	dh_testroot
	dh_clean -k

	dh_installdirs

	dh_installkpatches
	install -D -m755 debian/kerntypes-apply.sh \
		debian/tmp/usr/src/kernel-patches/all/apply/kerntypes
	install -D -m755 debian/kerntypes-unpatch.sh \
		debian/tmp/usr/src/kernel-patches/all/unpatch/kerntypes

	dh_installdocs
	dh_installchangelogs

	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-arch binary-indep

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