#!/usr/bin/make -f

%:
	dh $@ --with python2,python3

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build

override_dh_auto_build:
	dh_auto_build
	set -ex; for python in $(shell py3versions -r); do \
		$$python setup.py build --build-lib=$(CURDIR)/debian/tmp; \
	done;

override_dh_auto_install:
	dh_auto_install
	set -ex; for python in $(shell py3versions -r); do \
		$$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
	done;
	cp socks.py $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/
