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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
#!/usr/bin/make -f
# -*- makefile -*-
# 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
# Useful only to build aspell official dir
ASPELL6BASENAME = aspell6-gl
ASPELL6DIR = $(CURDIR)/debian/$(ASPELL6BASENAME)
ASPELLPROC = /usr/share/aspell-lang/proc # Location of proc script
TMP_BUILD = tmp-build
DOCS_ALL = tmp-build/leme.txt \
tmp-build/LICENZA.txt \
tmp-build/normas.txt \
tmp-build/readme.txt \
debian/README.Debian
%:
dh $@
override_dh_auto_build:
mkdir -p $(TMP_BUILD)
# -- igalician-minimos: Create compressed wordlist
gzip -9n -c galician.words > $(TMP_BUILD)/galician-minimos.mwl.gz
cp galician.aff $(TMP_BUILD)/galician-minimos.aff
# -- wgalician-minimos: Create wordlist
buildhash galician.words galician.aff galician.hash
cat galician.words | \
ispell -d ./galician -e | \
tr -s ' ' '\n' | \
LC_ALL=POSIX sort -u | \
iconv -f latin1 -t utf-8 > $(TMP_BUILD)/galician-minimos
# -- aspell-gl-es: Create myspell aff file and compressed wordlist
ispellaff2myspell --charset=latin1 \
--myheader=debian/gl_ES.myheader \
--replacements=debian/gl_ES.replaces \
galician.aff > $(TMP_BUILD)/gl-minimos_affix.dat
cat galician.words | \
prezip -s -c | \
gzip -9n -c > $(TMP_BUILD)/gl-minimos.cwl.gz
# -- Make docs utf-8
mkdir -p tmp
for i in readme.txt leme.txt normas.txt LICENZA.txt; do \
iconv -f iso-8859-1 -t utf-8 $$i > $(TMP_BUILD)/$$i; done
override_dh_auto_clean:
rm -rf $(TMP_BUILD)
rm -f core *.hash *.stat *.cnt
if [ -d $(ASPELL6DIR) ]; then \
rm $(ASPELL6DIR)/* && rmdir $(ASPELL6DIR); fi
dh_auto_clean
override_dh_auto_install:
installdeb-ispell -pigalician-minimos
installdeb-aspell -paspell-gl-minimos
installdeb-wordlist -pwgalician-minimos
dh_installdocs -A $(DOCS_ALL)
# Useful only to build aspell official dir
aspelltgz: clean build
mkdir -p $(ASPELL6DIR)
install -m 644 debian/aspell/Copyright $(ASPELL6DIR)
install -m 644 debian/aspell/info $(ASPELL6DIR)
install -m 644 /usr/share/common-licenses/GPL $(ASPELL6DIR)/COPYING
sed 's/gl-minimos/gl/' debian/aspell/gl-minimos.dat \
> $(ASPELL6DIR)/gl.dat
install -m 0644 debian/aspell/gl-minimos_phonet.dat $(ASPELL6DIR)/gl_phonet.dat
install -m 0644 $(TMP_BUILD)/gl-minimos_affix.dat $(ASPELL6DIR)/gl_affix.dat
install -m 0644 debian/README.minimos normas.txt $(ASPELL6DIR)/doc
cat galician.words | \
prezip -s -c > $(ASPELL6DIR)/gl.wl
( cd $(ASPELL6DIR) && \
ln -sf $(ASPELLPROC) && \
perl proc && \
./configure && \
make dist )
mv $(ASPELL6DIR)/$(ASPELL6BASENAME)*.tar.bz2 ..
|