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

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

#export PREFIX=/usr

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

%:
	dh $@


override_dh_auto_configure:
	cmake -DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBEXECDIR=lib \
		-DOPENSCAP_LIBRARIES=/usr/lib/$(DEB_HOST_MULTIARCH)/libopenscap.so.8 \
		-DOPENSCAP_INCLUDE_DIRS=/usr/include/openscap/
	dh_auto_configure

override_dh_auto_build:
	test -f doc/user_manual.html.ORIG || mv doc/user_manual.html doc/user_manual.html.ORIG
	dh_auto_build

#override_dh_auto_install:
#	dh_auto_install
#	false	#

override_dh_auto_clean:
	-test -f doc/user_manual.html.ORIG && mv -f doc/user_manual.html.ORIG doc/user_manual.html
	dh_auto_clean
