#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_BUILD_RPATH_USE_ORIGIN=ON
	sed -i -e 's:STRIP_FROM_PATH[[:space:]]*=:STRIP_FROM_PATH = ../..:g' obj-$(DEB_BUILD_GNU_TYPE)/api.dox
	sed -i -e 's:STRIP_FROM_PATH[[:space:]]*=:STRIP_FROM_PATH = ../..:g' obj-$(DEB_BUILD_GNU_TYPE)/api_tagfile.dox

override_dh_auto_install:
	dh_auto_install
	mv obj-$(DEB_BUILD_GNU_TYPE)/doxygen/html debian/tmp/html
	# Remove CURDIR from tag files to make reprotest happy
	sed -i -e 's:$(CURDIR)/::g' debian/tmp/usr/share/ignition/ignition-plugin*/ignition-plugin*.tag.xml

%:
	dh $@
