#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with python3

override_dh_clean:
	dh_clean
	rm -f voctomix-outcasts.html debian/debhelper-build-stamp
	rm -rf ./lib/__pycache__

include /usr/share/dpkg/pkg-info.mk

new-upstream-version: clean
	mkdir -p $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/
	rsync -av --delete --exclude=debian/ \
	    --exclude=$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/ \
	    * $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/
	find "$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)" \
	    -xdev \( -type f -o -type l \) -print \
	    | sort \
	    | tar -cJaf "../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz" \
	    -T- --owner=root --group=root --mode=a+rX
	$(RM) -r "$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)"
