#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@  --with python2

# Ignore testsuite failure on big-endian archs
ifeq (big,$(shell dpkg-architecture -qDEB_BUILD_ARCH_ENDIAN)))
override_dh_auto_test:
	-dh_auto_test
endif

override_dh_clean:
	dh_clean
	-rm -f python/pocketsphinx.c
	-$(RM) -r python/build

override_dh_auto_install:
	dh_auto_install
	for file in $$(find debian/tmp/usr/lib/ -name "*.la" -o -name _pocketsphinx.a); do \
		rm $$file ; \
	done
