#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

GNULIB_MODULES := "bootstrap c99 configmake flock gnu-make manywarnings relocatable-lib-lgpl snippet/unused-parameter strchrnul strdup-posix ssize_t valgrind-tests"

%:
	dh $@ --with gnome

override_dh_autoreconf:
	gnulib-tool --lgpl --makefile-name=Makefile.gnulib --aux-dir=build-aux --m4-base=m4 --doc-base=doc --lib=libgnu --local-dir=gl-mod/bootstrap --local-dir=gl --source-base=lib --libtool --symlink --import "$(GNULIB_MODULES)"
	dh_autoreconf

override_dh_auto_configure:
	# Add here commands to configure the package.
	dh_auto_configure -- --with-hunspell-dir=/usr/share/hunspell \
                             --disable-zemberek

override_dh_auto_build:
	# Move the enchant.ordering to /usr/share/enchant-2 to be
	# co-installable with enchant v1
	dh_auto_build -- pkgdatadir=/usr/share/enchant-2

override_dh_makeshlibs:
	dh_makeshlibs -Xusr/lib/$(DEB_HOST_MULTIARCH)/enchant-2/

override_dh_clean:
	dh_clean
	rm -f m4/gnulib-cache.m4

# Disable the tests for now
override_dh_auto_test:
