#!/usr/bin/make -f include /usr/share/dpkg/pkg-info.mk DICT_LANG = $(lastword $(subst -, ,$(DEB_SOURCE))) DEB_DESTDIR = debian/$(DEB_SOURCE) %: dh $@ override_dh_auto_configure: cp /usr/share/hunspell/sk_SK.aff sk_affix.dat cp /usr/share/hunspell/sk_SK.dic sk_sk.dic # remove the word count (the first line) # remove words with spaces, but not possible hunspell morphological data # remove hunspell morphological data # remove words with dashes, aspell doesn’t support those # remove words with French accents, fall outside of the charset LC_ALL=C sed \ -e 1d \ -e 's/ [a-z][a-z]:.*//' \ -e '/ /d' \ -e '/-/d' \ -e '/à/d' \ -e '/ê/d' \ sk_sk.dic > sk.wl prezip -sz sk.wl override_dh_md5sums: dh_md5sums -Xvar/lib/aspell override_dh_auto_install: for f in *.cwl; do \ gzip -9 -c "$$f" > "$(DEB_DESTDIR)/usr/share/aspell/"$$f".gz"; \ WL=`echo $$f | sed 's/\.cwl$$//'`; \ touch "$(DEB_DESTDIR)/var/lib/aspell/$$WL.rws"; \ dh_link "var/lib/aspell/$$WL.rws" "usr/lib/aspell/$$WL.rws"; \ echo "$$WL" >> "$(DEB_DESTDIR)/usr/share/aspell/$(DICT_LANG).contents"; \ done LC_ALL=C sort -o $(DEB_DESTDIR)/usr/share/aspell/$(DICT_LANG).contents \ $(DEB_DESTDIR)/usr/share/aspell/$(DICT_LANG).contents touch $(DEB_DESTDIR)/var/lib/aspell/$(DICT_LANG).compat installdeb-aspell execute_before_dh_gencontrol: package=hunspell-sk; \ pkgname=$$(dpkg-query -W -f='$${source:Package}' $$package); \ pkgver=$$(dpkg-query -W -f='$${source:Version}' $$package); \ echo "$$package:Built-Using=$$pkgname (= $$pkgver)" >> debian/$(DEB_SOURCE).substvars