#!/usr/bin/make -f

%:
	dh $@

# build myspell data under specific locale, needed to properly sort
override_dh_auto_build:
	mkdir -p debian/locale
	localedef -i lt_LT -f ISO-8859-13 debian/tmp_locale
	LOCPATH=debian/locale LC_ALL=lt_LT.ISO-8859-13 $(MAKE) myspell

	gzip -cn9 lietuviu.dict > lietuviu.mwl.gz
	cp lietuviu.dict lt.wl
	prezip lt.wl
	gzip -n9 lt.cwl

	$(MAKE) aspell

override_dh_auto_install:
override_dh_install:
	dh_install

	installdeb-ispell -pilithuanian
	installdeb-aspell -paspell-lt

override_dh_fixperms:
	dh_fixperms
	chmod -x debian/ilithuanian/usr/lib/ispell/lietuviu.aff
