#!/usr/bin/make -f

%:
	dh $@ --buildsystem=pybuild

ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
	http_proxy=127.0.0.1:9 \
	https_proxy=127.0.0.1:9 \
	PYTHONPATH=. \
	python3 -m sphinx -N -bhtml docs/ build/html
endif

# Install an actual icon where the desktop file can load it.
execute_after_dh_install:
	install -D icon_48x48.png \
	  debian/nanovna-saver/usr/share/icons/hicolor/48x48/apps/NanoVNASaver_48x48.png
