#!/usr/bin/make -f

execute_before_dh_auto_clean:
	dh_auto_clean     --sourcedirectory=c --buildsystem=cmake

execute_before_dh_auto_configure:
	dh_auto_configure --sourcedirectory=c --buildsystem=cmake -- -DBUILD_SHARED_LIBS=YES

execute_after_dh_auto_build:
	dh_auto_build     --sourcedirectory=c --buildsystem=cmake

execute_before_dh_auto_test:
	dh_auto_test      --sourcedirectory=c --buildsystem=cmake

override_dh_auto_install:
	dh_auto_install   --sourcedirectory=c --buildsystem=cmake
	dh_auto_install -N libblake3-dev -N libblake3-0

	# remove files generated by cmake's configure part above, since copying
	# of sources happens in auto_build..
	rm -rf debian/librust-blake3-dev/usr/share/cargo/registry/blake3-*.*.*/obj-*/

%:
	dh $@ --buildsystem cargo
