#!/usr/bin/make -f

DEB_BUILDDIR := $(CURDIR)/debian/build

LD_LIBRARY_PATH := /usr/lib/sanlock:$(LD_LIBRARY_PATH)
#LD_LIBRARY_PATH=/usr/lib/sanlock:${LD_LIBRARY_PATH}
#LD_LIBRARY_PATH=/usr/lib/sanlock:$(LD_LIBRARY_PATH) dh_shlibdeps
#LD_LIBRARY_PATH := /usr/lib/sanlock

override_dh_auto_build:
	dh_auto_build -D wdmd
	dh_auto_build -D src
	dh_auto_build -D python

override_dh_auto_clean:
	dh_auto_clean -D wdmd
	dh_auto_clean -D src
	dh_auto_clean -D python

override_dh_auto_configure:
	dh_auto_configure -D wdmd
	dh_auto_configure -D src
	dh_auto_configure -D python

override_dh_auto_install:
	dh_auto_install -D wdmd
	dh_auto_install -D src
	dh_auto_install -D python

override_dh_makeshlibs:
	dh_makeshlibs -X/usr/lib/sanlock

override_dh_auto_test:
	dh_auto_test -D wdmd
	dh_auto_test -D src
	dh_auto_test -D python

override_dh_installinit:
	dh_installinit -psanlock --name=wdmd --no-restart-on-upgrade --no-start
	dh_installinit -psanlock --name=sanlock --no-restart-on-upgrade

%:
	dh $@ --with=python2,systemd
