#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
	    -DCMAKE_BUILD_TYPE=RelWithDebInfo

override_dh_install:
	dh_install --
	# need to remove files present in components
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/ignition/common/av.hh
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/ignition/common/events.hh
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/ignition/common/geospatial.hh
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/ignition/common/graphics.hh
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/ignition/common/io.hh
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/ignition/common/testing.hh
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/gz/common/av.hh
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/gz/common/events.hh
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/gz/common/geospatial.hh
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/gz/common/graphics.hh
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/gz/common/io.hh
	$(RM) debian/libgz-common5-core-dev/usr/include/gz/common*/gz/common/testing.hh
	dh_missing --list-missing

# test cannot run in parallel
override_dh_auto_test:
	dh_auto_test --max-parallel=1
