#!/usr/bin/make -f

%:
	dh $@ --sourcedir=flowblade-trunk --buildsystem=pybuild

override_dh_missing:
	dh_missing -Xflowblade-trunk


# Regression: the generatino of the .pyc files got lost in the CDBS -> pybuild conversion

#Files in first .deb but not in second
#-------------------------------------
#-rwxr-xr-x  root/root   /usr/share/python3/runtime.d/flowblade.rtupdate
#-rwxr-xr-x  root/root   DEBIAN/postinst
#-rwxr-xr-x  root/root   DEBIAN/prerm

execute_after_dh_auto_install:
	mkdir -p debian/flowblade/usr/share/flowblade
	mv debian/flowblade/usr/lib/python3.*/dist-packages/Flowblade debian/flowblade/usr/share/flowblade/
	mv debian/flowblade/usr/lib/python3.*/dist-packages/flowblade*.egg-info debian/flowblade/usr/share/flowblade/
	chmod +x debian/flowblade/usr/share/flowblade/Flowblade/launch/flowblade*
	rm -rf debian/flowblade/usr/lib/python3.*/
	find debian/flowblade -type f -name '*.pyc' -delete
	find debian/flowblade -type d -name __pycache__ -delete
