1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
#!/usr/bin/make -f
# coding: koi8-r
# [debian/rules] for rus-ispell
#
# COPYRIGHT C 2005-2011 Martin-Eric Racine <martin-eric.racine@iki.fi>
# COPYRIGHT C 2011-2018 Agustin martin Domingo <agmartin@debian.org>
#
# LICENSE
# This package is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License or (at
# your option) any later version.
#
%:
dh $@
ILANGUAGE=russian
LANG_COUNTRY=ru_RU
DICT_LANG=ru
DICTIONARIES=base.koi abbrev.koi computer.koi for_name.koi geography.koi science.koi
# Explicitely declare the encoding to ensure that 'grep' and 'tr' work as expected.
LANG=C
LC_ALL=C
export LANG LC_ALL
override_dh_auto_build:
# Generate ispell dictionary.
grep -h '[]' $(DICTIONARIES) | tr '\243\263' '\305\345' > yo_subst.koi
cat $(DICTIONARIES) yo_subst.koi |./sortkoi8 | uniq > $(ILANGUAGE).dict
sed -e "s/^\#[ye]//;s/^\#koi/wordchars/" $(ILANGUAGE).aff.koi > $(ILANGUAGE).aff
# Generate traditional ispell hash needed by i2myspell.
buildhash $(ILANGUAGE).dict $(ILANGUAGE).aff $(ILANGUAGE).hash
# Generate gzipped munched wordlist for ispell 3.3 dictionary.
gzip -nc --best $(ILANGUAGE).dict > $(ILANGUAGE).mwl.gz
# Generate myspell dictionary (KOI8-R).
i2myspell -d ./$(ILANGUAGE).dict > $(LANG_COUNTRY).dic
i2myspell ./$(ILANGUAGE) KOI8-R \
ţ | \
sed 's/ - / 0 /' > $(LANG_COUNTRY).aff
# Generate aspell dictionary; build-depends on aspell because of prezip.
cp $(LANG_COUNTRY).aff $(DICT_LANG)_affix.dat
cat $(LANG_COUNTRY).dic | sed 1d | LC_COLLATE=C sort -u | prezip > $(DICT_LANG).cwl
gzip -n $(DICT_LANG).cwl
echo "add $(DICT_LANG).rws" > $(DICT_LANG).multi
echo "add $(DICT_LANG).multi" > $(ILANGUAGE).alias
# Make sure dh_clean does not remove this upstream file
override_dh_clean:
dh_clean -Xold/README.orig
override_dh_auto_clean:
# Clean ispell files.
rm -f *.cnt *.hash *.stat yo_subst.koi *.utf8
# Also delete aff and dict, since we build them here.
rm -f $(ILANGUAGE).aff $(ILANGUAGE).dict $(ILANGUAGE).mwl.gz
# Clean myspell files.
rm -f $(LANG_COUNTRY).aff $(LANG_COUNTRY).dic x
# Clean aspell files.
rm -f *.alias *_affix.dat *.multi *.*wl*
override_dh_auto_install:
installdeb-ispell --package=i$(ILANGUAGE)
installdeb-aspell --package=aspell-$(DICT_LANG)
#EOF
|