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

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CFLAGS += -fPIC
CONFPARA = --enable-gpl --enable-useflags --enable-libsensors

%:
	dh $@ --no-parallel

override_dh_auto_configure:
	$(CURDIR)/beforeconf.sh
	dh_auto_configure -- $(CONFPARA)

override_dh_autoreconf:
	dh_autoreconf --exclude=mkinstalldirs

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog

override_dh_installman:
	dh_installman doc/iseltime.8
	dh_installman

override_dh_installsystemd:
	dh_installsystemd debian/ipmiutil.ipmiutil_wdt.service
	dh_installsystemd --no-enable --no-start debian/ipmiutil.ipmi_port.service
	dh_installsystemd --no-enable --no-start debian/ipmiutil.ipmiutil_asy.service
	dh_installsystemd --no-enable --no-start debian/ipmiutil.ipmiutil_evt.service