#!/usr/bin/make -f

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

export DEB_CFLAGS_MAINT_APPEND = -fcommon

%:
	dh $@ --with=python3

override_dh_auto_install:
	dh_auto_install
	find debian/tmp -type f -name "*.la" -delete
	cd debian/tmp/usr/share/doc/lives-$(DEB_VERSION_UPSTREAM) && \
		rm \
			ChangeLog \
			FEATURES \
			AUTHORS
	find debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/lives -type d -empty -delete
	find debian/tmp/usr/share/lives -type d -empty -delete
	chmod a-x \
		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/lives/plugins/effects/realtime/weed/data/fourKlives/songs/*.txt

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3
	dh_python3 --shebang=/usr/bin/python3 /usr/lib/$(DEB_HOST_MULTIARCH)/lives/plugins/encoders
