#!/usr/bin/make -f
# -*- makefile -*-

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

BUILDROOT := $(shell pwd)
export DEB_BUILD_HARDENING=1

get-orig-source:
	uscan --noconf --force-download --rename --repack --download-current-version --destdir=.

%:
	dh $@ --with python2 --with autoreconf

override_dh_auto_configure:
	#[ -f configure ] || sh autogen.sh # Use this when tarball is fixed
	if [ -e configure -a ! -x configure ]; then chmod u+x configure; fi
	./configure --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib/fence-agents

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(BUILDROOT)/debian/tmp
	dh_install --list-missing

override_dh_autoreconf:
	dh_autoreconf ./autogen.sh
