#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# Support parallel build
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   MAKEFLAGS += -j$(NUMJOBS)
endif

# enable hardeing
export DEB_BUILD_HARDENING=1

%:
	dh $@ --with autoreconf

override_dh_autoreconf:
	cp tools/solarpowerlog.init debian/
	cp tools/solarpowerlog.default debian/
	# needed when building directly from the git repository.
	# otherwise some files are missing.
	dh_autoreconf ./bootstrap.sh

	
override_dh_clean:
	dh_clean
	rm -f debian/solarpowerlog.init debian/solarpowerlog.default