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 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
#!/usr/bin/make -f
#
# <agmartin@debian.org>
#
BUILDHASH = buildhash
LANGUAGE = espa~nol
ISOLANG = es
DICTIONARY = $(LANGUAGE).words $(LANGUAGE).comp
OTHERDICTS = debian/debian.words
HASHFILE = $(LANGUAGE).hash
AFFIXES = ./$(LANGUAGE).aff
#
ALIBDIR = $(CURDIR)/debian/aspell-es/usr/lib/aspell
ASHAREDIR = $(CURDIR)/debian/aspell-es/usr/share/aspell
#
ILIBDIR = $(CURDIR)/debian/ispanish/usr/lib/ispell
ISHAREDIR = $(CURDIR)/debian/ispanish/usr/share/ispell
#
OOOTMP = ooo-tmp
#
ASPELL6BASENAME = aspell6-es
ASPELL6DIR = $(CURDIR)/debian/$(ASPELL6BASENAME)
ASPELLPROC = /usr/share/aspell-lang/proc # Location of proc script
# Make sure build is always done in a reproducible and working
# language environment
LC_ALL = C
export LC_ALL
include /usr/share/quilt/quilt.make
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: $(QUILT_STAMPFN)
dh_testdir
sh -e < debian/aff2latin1 > $(AFFIXES).latin1
test -n "$(OTHERDICTS)" && \
munchlist -v -l $(AFFIXES) $(OTHERDICTS)>$(LANGUAGE).otherwords+
( cat $(LANGUAGE).words+ $(LANGUAGE).otherwords+ && \
grep -h -e ^.$$ -e ^./ $(LANGUAGE).words ) | \
sort | \
icombine $(AFFIXES) | \
sed -f debian/orig2latin1.sed > $(LANGUAGE).allwords+.latin1
gzip -9n -c $(LANGUAGE).allwords+.latin1 > $(LANGUAGE).mwl.gz
cat $(LANGUAGE).allwords+.latin1 | prezip -s -c | gzip -9n -c > $(ISOLANG).cwl.gz
# ----- Creating myspell dict
( echo `cat $(LANGUAGE).allwords+.latin1 | wc -l`; cat $(LANGUAGE).allwords+.latin1 ) > es_ES.mydict
ispellaff2myspell --charset=latin1 \
--replacements=debian/es_ES.replaces \
--myheader=debian/es_ES.myheader $(AFFIXES).latin1 > es_ES.myaff
# -----
# cat $(LANGUAGE).allwords+.latin1 | ispell -d ./$(LANGUAGE) -e | \
# tr -s ' ' '\n' > $(LANGUAGE).wordlist
# -----------------------------------
touch build-stamp
aspelltgz: 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
install -m 644 debian/es.dat $(ASPELL6DIR)
install -m 644 es_ES.myaff $(ASPELL6DIR)/es_affix.dat
cat es_ES.mydict | sed 1d | LANG=C sort -u > $(ASPELL6DIR)/es.wl
( cd $(ASPELL6DIR) && \
ln -sf $(ASPELLPROC) && \
perl proc && \
./configure && \
make dist )
mv $(ASPELL6DIR)/$(ASPELL6BASENAME)*.tar.bz2 ..
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
rm -f build-stamp
rm -f core *.hash *.stat *.cnt *.latin1 *.otherwords+ *~
# rm -f $(LANGUAGE).wordlist
rm -f es_ES.mydict es_ES.myaff $(LANGUAGE).mwl.gz
rm -f es_affix.dat $(ISOLANG).cwl.gz
rm -rf $(OOOTMP)
if [ -d $(ASPELL6DIR) ]; then \
rm -rf $(ASPELL6DIR); fi
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs --all
dh_installdocs --all README LEAME
# ------ ispell ----------------------------------------
install -m644 espa~nol.aff.latin1 $(ILIBDIR)/espa~nol.aff
install -m644 $(LANGUAGE).mwl.gz $(ISHAREDIR)
installdeb-ispell -pispanish
# ------ myspell/hunspell ------------------------------
mkdir -p $(OOOTMP)
cp es_ES.mydict $(OOOTMP)/es.dic
cp es_ES.myaff $(OOOTMP)/es.aff
installdeb-myspell -pmyspell-es --srcdir=$(OOOTMP)
installdeb-hunspell -pmyspell-es
# ------ aspell ----------------------------------------
install -m644 debian/$(ISOLANG).dat $(ALIBDIR)
install -m644 es_ES.myaff $(ALIBDIR)/es_affix.dat
install -m644 $(ISOLANG).cwl.gz $(ASHAREDIR)
echo "add es.rws" > $(ALIBDIR)/es.multi
echo "add es.multi" > $(ALIBDIR)/spanish.alias
installdeb-aspell -paspell-es
# ----------------------------------------------
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_installchangelogs -i
dh_link -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary-arch:
binary: binary-indep
.PHONY: build clean clean-patched binary-indep binary-arch binary install patch unpatch
|