#!/usr/bin/make -f

export DH_VERBOSE = 1
export CARGO_HOME=$(CURDIR)/debian/cargo_home
export HOME=$(CURDIR)/debian/cargo_home
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
export RUST_BACKTRACE=1


%:
	dh $@ --with bash-completion,sphinxdoc

override_dh_auto_build:
	cargo build --verbose --release
#define http_proxy after using rustup and cargo as they use the network
	export http_proxy=127.0.0.1:9
	export https_proxy=127.0.0.1:9
	make -C docs man
	mkdir -p completions
	"target/release/sn0int" completions bash > completions/sn0int.bash
	"target/release/sn0int" completions zsh > completions/_sn0int
	"target/release/sn0int" completions fish > completions/sn0int.fish

override_dh_auto_test:
	# do not run tests as it would require more downloads
