#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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


# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

%:
	dh $@

override_dh_auto_configure:
	# Actually --prefix is ignored so far (svn rev 206)
	./configure --prefix=$(CURDIR)/debian/netsend/usr

override_dh_auto_build:
	# This builds netsend
	dh_auto_build
	# This builds netsend.1
	dh_auto_build -- man

override_dh_auto_install:
	# Upstream make ignores the "configure --prefix="
	# setting so far (svn rev 203)
	dh_auto_install -- DESTDIR=$(CURDIR)/debian/netsend/usr

override_dh_auto_test:
	# don't test the network commands.
