#!/usr/bin/make -f

%:
	dh $@ --parallel --with elpa

override_dh_auto_build:
	$(MAKE) info

# CHANGES.org is a bit outdated, but probably still of interest.  If
# you think otherwise, I do not object.
# -- Dmitry Bogatov <KAction@gnu.org> Wed Jun 22 14:13:06 MSK 2016
override_dh_installchangelogs:
	dh_installchangelogs CHANGES.org

# These tests require terminal, and the following is true:
#
#  * Buildd can't be expected to provide one
#  * Both sbuild and pbuilder has issues with pty's (#829299).
#
# That is why code below run tests only if test [ -t 1 ].
#
# -- Dmitry Bogatov <KAction@gnu.org> Wed, 14 Dec 16 06:05:23 +0300
override_dh_elpa_test:
	if [ -t 1 -a -t 0 ] ; then $(MAKE) test ; fi

override_dh_elpa:
	dh_elpa
	sed -i 's#"evil-core"#"evil"#g' \
	    debian/elpa-evil/usr/share/emacs/site-lisp/elpa-src/evil-*/evil-autoloads.el
