| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/pkg-info.mk |
| 4 |
|
| 5 |
DICT_LANG = $(lastword $(subst -, ,$(DEB_SOURCE))) |
| 6 |
DEB_DESTDIR = debian/$(DEB_SOURCE) |
| 7 |
|
| 8 |
%: |
| 9 |
dh $@ |
| 10 |
|
| 11 |
override_dh_auto_configure: |
| 12 |
LC_ALL=C sed \ |
| 13 |
-e 's/[ \t][a-z][a-z]:.*//' \ |
| 14 |
/usr/share/hunspell/sk_SK.aff > sk_affix.dat |
| 15 |
# remove the word count (the first line) |
| 16 |
# remove words with spaces, but not possible hunspell morphological data |
| 17 |
# remove all tabulation characters |
| 18 |
# remove hunspell morphological data |
| 19 |
# remove words with dashes, aspell doesn’t support those |
| 20 |
# remove words with French accents, fall outside of the charset |
| 21 |
LC_ALL=C sed \ |
| 22 |
-e 1d \ |
| 23 |
-e 's/[ \t][a-z][a-z]:.*//' \ |
| 24 |
-e 's/\t//g' \ |
| 25 |
-e '/ /d' \ |
| 26 |
-e '/-/d' \ |
| 27 |
-e '/à/d' \ |
| 28 |
-e '/ê/d' \ |
| 29 |
/usr/share/hunspell/sk_SK.dic > sk.wl |
| 30 |
prezip -sz sk.wl |
| 31 |
|
| 32 |
override_dh_md5sums: |
| 33 |
dh_md5sums -Xvar/lib/aspell |
| 34 |
|
| 35 |
override_dh_auto_install: |
| 36 |
for f in *.cwl; do \ |
| 37 |
gzip -9 -c "$$f" > "$(DEB_DESTDIR)/usr/share/aspell/"$$f".gz"; \ |
| 38 |
WL=`echo $$f | sed 's/\.cwl$$//'`; \ |
| 39 |
touch "$(DEB_DESTDIR)/var/lib/aspell/$$WL.rws"; \ |
| 40 |
dh_link "var/lib/aspell/$$WL.rws" "usr/lib/aspell/$$WL.rws"; \ |
| 41 |
echo "$$WL" >> "$(DEB_DESTDIR)/usr/share/aspell/$(DICT_LANG).contents"; \ |
| 42 |
done |
| 43 |
|
| 44 |
LC_ALL=C sort -o $(DEB_DESTDIR)/usr/share/aspell/$(DICT_LANG).contents \ |
| 45 |
$(DEB_DESTDIR)/usr/share/aspell/$(DICT_LANG).contents |
| 46 |
|
| 47 |
touch $(DEB_DESTDIR)/var/lib/aspell/$(DICT_LANG).compat |
| 48 |
|
| 49 |
installdeb-aspell |
| 50 |
|
| 51 |
|
| 52 |
override_dh_gencontrol: package=hunspell-sk |
| 53 |
override_dh_gencontrol: pkgname=$(shell dpkg-query -W -f='$${source:Package}' $(package)) |
| 54 |
override_dh_gencontrol: pkgver=$(shell dpkg-query -W -f='$${source:Version}' $(package)) |
| 55 |
override_dh_gencontrol: |
| 56 |
echo "$(package):Built-Using=$(pkgname) (= $(pkgver))" >> debian/$(DEB_SOURCE).substvars |
| 57 |
dh_gencontrol -- "-v$(pkgver)+$(DEB_VERSION_UPSTREAM_REVISION)" |