#!/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=nvram

build:
	$(checkdir)
	make
	touch build

clean:
	$(checkdir)
	-rm -f build
	-make clean
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp debian/files* core debian/substvars

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

binary-arch: checkroot build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	install -d debian/tmp/usr/sbin debian/tmp/usr/share/man/man8
	make install PREFIX=`pwd`/debian/tmp/usr \
	             MANDIR=`pwd`/debian/tmp/usr/share/man
	dh_installdocs
	dh_installchangelogs
	dh_installmanpages
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_installdeb
	#dh_du
	dh_md5sums
	dh_builddeb

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
