#!/usr/bin/make -f
export DH_VERBOSE = 1

export PYBUILD_NAME=python-louvain
VERS=0.11

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

override_dh_install:
	dh_install
	cd debian/python3-louvain/usr/lib/python3*/dist-packages && mv python_louvain-$(VERS).egg-info python_community-$(VERS).egg-info
	cd debian/python3-louvain/usr/bin && mv community louvain-community

override_dh_auto_clean:
	dh_auto_clean
	# clean, even if the package was renamed
	rm -rf debian/python3-louvain debian/python3-louvain.*.debhelper
	rm -rf debian/python3-community debian/python3-community.*.debhelper
	rm -f debian/python3-community.substvars
