#!/usr/bin/make -f

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

execute_after_dh_install:
	dh_install
	# remove the script cme because it conflicts with the file
	# provided by the pacakge named cme
	rm debian/crackmapexec/usr/bin/cme
	# remove hooks
	rm -rf debian/crackmapexec/usr/lib/python3*/dist-packages/cme/.hooks

execute_after_dh_fixperms:
	for f in debian/crackmapexec/usr/lib/python3/dist-packages/cme/*.py debian/crackmapexec/usr/lib/python3/dist-packages/cme/*/*.py debian/crackmapexec/usr/lib/python3/dist-packages/cme/*/*/*.py debian/crackmapexec/usr/lib/python3/dist-packages/cme/data/cme.conf debian/crackmapexec/usr/lib/python3/dist-packages/cme/data/videos_for_darrell.harambe; do \
		chmod 644 $$f; \
	done
