#!/usr/bin/make -f
# -*- makefile -*-
%:
	dh $@

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

# Make sure build is always done in a reproducible and working
# language environment
LC_ALL = C
export LC_ALL
APACKAGE = aspell-pt-br

override_dh_auto_build:
	sed -e '1d' -e '/[\. ]/d' pt_BR.dic | fromdos | \
		grep -v -f debian/exclude-patterns.grep  | \
		prezip -s | gzip -9n -c > debian/aspell-files/pt_BR.cwl.gz
	install -m 644 pt_BR.aff debian/aspell-files/pt_BR_affix.dat
	fromdos debian/aspell-files/pt_BR_affix.dat


override_dh_auto_clean:
	rm -f debian/aspell-files/pt_BR_affix.dat debian/aspell-files/pt_BR.cwl.gz

	dh_auto_clean

override_dh_auto_install:
	installdeb-aspell   -p$(APACKAGE)
	dh_auto_install
