1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
2 # Contributor: Alexander Fehr <pizzapunk gmail com>
7 pkgdesc="German hunspell dictionaries"
9 url="https://www.j3e.de/ispell/igerman98/"
11 makedepends=('hunspell' 'ispell' 'qt6-webengine')
12 optdepends=('hunspell: the spell checking libraries and apps')
13 source=("https://www.j3e.de/ispell/igerman98/dict/igerman98-$pkgver.tar.bz2")
14 sha256sums=('17296f03c5fea62d76ecc530ebe80f6adc430278f58d472dc1842d71612960a8')
17 cd "$srcdir/igerman98-$pkgver"
18 make hunspell/de_AT.dic hunspell/de_AT.aff \
19 hunspell/de_CH.dic hunspell/de_CH.aff \
20 hunspell/de_DE.dic hunspell/de_DE.aff
22 # fix file encoding - FS#68481
23 # check for broken files using
24 # file -i $(pacman -Ql hunspell-de | sed "s/hunspell-de//") | grep iso
26 for file in de_AT.dic de_AT.aff README_de_AT.txt \
27 de_CH.dic de_CH.aff README_de_CH.txt \
28 de_DE.dic de_DE.aff README_de_DE.txt; do
29 mv $file $file.ISO-8859
30 iconv -f iso-8859-1 -t utf-8 $file.ISO-8859 -o $file
31 # fix encoding in .aff files
32 sed -i "s/ISO8859-1/UTF-8/" $file
38 cd "$srcdir/igerman98-$pkgver/hunspell"
39 install -dm755 "${pkgdir}"/usr/share/hunspell
40 cp -p de_??.dic de_??.aff "$pkgdir"/usr/share/hunspell
42 pushd "$pkgdir"/usr/share/hunspell/
43 de_DE_aliases="de_BE de_LU"
44 for lang in $de_DE_aliases; do
45 ln -s de_DE.aff $lang.aff
46 ln -s de_DE.dic $lang.dic
49 for lang in $de_CH_aliases; do
50 ln -s de_CH.aff $lang.aff
51 ln -s de_CH.dic $lang.dic
56 install -dm755 "${pkgdir}"/usr/share/myspell/dicts
57 pushd "$pkgdir"/usr/share/myspell/dicts
58 for file in "$pkgdir"/usr/share/hunspell/*; do
59 ln -sv /usr/share/hunspell/$(basename $file) .
63 # Install webengine dictionaries
64 install -d "$pkgdir"/usr/share/qt{,6}/qtwebengine_dictionaries/
65 for _file in "$pkgdir"/usr/share/hunspell/*.dic; do
66 _filename=$(basename $_file)
67 /usr/lib/qt6/qwebengine_convert_dict $_file "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic}
68 ln -rs "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic} "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/
72 install -dm755 ${pkgdir}/usr/share/doc/$pkgname
73 cp -p README_de_??.txt "$pkgdir"/usr/share/doc/$pkgname