#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export CC=cuda-gcc
#export CXX=cuda-g++

%:
	dh $@ -Scmake --with python3

#execute_before_dh_auto_configure:
#	cp -rv debian/gputreeshap $(CURDIR)
#	# patch the cmake file
#	sed -e '20,$$d' -i gputreeshap/CMakeLists.txt
#
#override_dh_auto_configure:
#	dh_auto_configure -- \
#		-DUSE_CUDA=ON -DBUILD_WITH_CUDA_CUB=ON -DUSE_NCCL=ON

execute_after_dh_auto_install:
	cd python-package; python3 setup.py install --install-layout=deb \
		--root=$(shell pwd)/debian/tmp/
	mkdir -p debian/tmp/usr/lib/python3/dist-packages/xgboost/lib/
	ln -s ../../../../$(DEB_HOST_MULTIARCH)/libxgboost.so.0 \
		debian/tmp/usr/lib/python3/dist-packages/xgboost/lib/libxgboost.so
