#!/usr/bin/make -f

# This file was automatically generated by stdeb 0.9.0 at
# Thu, 06 Feb 2020 00:20:02 +0100

%:
	dh $@ --with python3 --buildsystem=python_distutils

override_dh_auto_clean:
	rm -f opensnitch/resources_rc.py
	rm -rf opensnitch/i18n/
	python3 setup.py clean -a
	find . -name \*.pyc -exec rm {} \;

override_dh_auto_build:
	python3 setup.py build --force

override_dh_auto_install:
	cd i18n; make
	cp -r i18n/locales/ opensnitch/i18n/
	pyrcc5 -o opensnitch/resources_rc.py opensnitch/res/resources.qrc
	find opensnitch/proto/ -name 'ui_pb2_grpc.py' -exec sed -i 's/^import ui_pb2/from . import ui_pb2/' {} \;
	python3 setup.py install --force --root=debian/python3-opensnitch-ui --no-compile -O0 --install-layout=deb  

override_dh_python2:
	dh_python2 --no-guessing-versions
