#!/usr/bin/make -f
# debian/rules for devscripts, based on the example file rules.indep.

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

build: build-stamp
build-stamp:
	dh_testdir
	./configure --prefix=/usr --mandir='$${prefix}/share/man'
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-$(MAKE) distclean
	rm -f build-stamp
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	$(MAKE) prefix=`pwd`/debian/tmp/usr install

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs README README.i18n
	dh_installexamples
#	This is now done by the make install command above, albeit a little
#	less efficiently
#	dh_installmanpages
	cp debian/test `pwd`/debian/tmp/usr/lib/debian-test/tests/devscripts
	chmod 755 `pwd`/debian/tmp/usr/lib/debian-test/tests/devscripts
	dh_installchangelogs
	dh_compress
	dh_fixperms
	dh_suidregister
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

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

# Local variables:
# mode: makefile
# End:
