1 # Maintainer: Angel Velasquez <angvp@archlinux.org>
2 # Maintainer: AndyRTR <andyrtr@archlinux.org>
5 pkgname=(hunspell-es_any hyphen-es mythes-es)
10 url="https://github.com/sbosio/rla-es"
12 makedepends=(qt6-webengine)
20 'DO "Dominican Republic"'
36 source=(https://github.com/sbosio/rla-es/releases/download/v$pkgver/es.oxt)
39 for _co in "${_countries[@]}"; do
41 noextract+=(es_$_code.oxt)
42 source+=("https://github.com/sbosio/rla-es/releases/download/v$pkgver/es_$_code.oxt")
43 _pkgname=hunspell-es_${_code,,}
45 eval "package_$_pkgname() {
50 sha256sums=('01281376647d6578768b3df39451145e4ddea700f9ef66dc711cae475d5a77c3'
51 '37dfafc6337fe15f11219e2f26d137847f533cfa6851477dd989983e369478db'
52 'ec00238ae753aeb3daab9552caab248b90ba75917ffdd859327da0f2f729c1b9'
53 '9a44fed6d69de3f9519737a97fb25eccfd088f8cc5132463740f4cb84f631da4'
54 '4e5bb2090d302b059709cc9127e56a4d357dc0cdfe229c05275ad6ece85d8790'
55 'ea44959f48e049e9d0177fde26437f0a163db8db9ae6352eb96f974045badb05'
56 '66f8852123fccc0d525913cd078f05094cd8c01ea71953672f2658a1d6b9caae'
57 'e2a73413ceb9b70dd642c452a66e5e9a8a4c673b7ddb5107fd0c5e77997c59fa'
58 '6978e235a8d3c9e0a779676f83c0c8e22e8e3f71ee6809fba53adc7767468d76'
59 '490c8ae7bf411cef10e6ed4b0f467aac565422fbc15da027d5294681ebc0c9c9'
60 '4b58c9828b253b61af5e52bca85f6f0a9ae6e3be7bed9f46810dd16a6b590334'
61 'e0d1dd7bb594b10e2571a5a22ac82d999418597e0b0baa8338c08a557539d0b6'
62 '5aa70a255dd1121e60c1de84e159940b13fabcb9d2b3306dd0c489d97b3d64fd'
63 '90a5899511f71463912c7d5547c9667d67b035f8648d8759434770fff9761bd5'
64 '2293fd64e663819a79b1c1ee411dc9113e012e29f8cd9ce7e977eb9986a6ab89'
65 'ce0500a1ec4168c0f94f46d161620c196f00b64c1d00091c5f078f15a7f30e20'
66 '4e9bb0c067f9fd80987b59351126a39ce82615f71d6d44889de613e35d8096de'
67 'b7bd4d3568404fd516b2d9622c5a469a220aa72802a8576805212c01fcb8bedb'
68 '78c2d794c26ad3d29e5ce2bd6eb538b60691f327368a62ae663f5a095e11d3b6'
69 '089613450ca4883349da9492980501508c18fc3ae63c8c569a27554c7f8fe4df'
70 'f8f725a4240b5a2f76db5c2a538d483498329b817b573f4c91ccbaeba7e704f0')
73 pkgdesc="Spanish ($2) hunspell dictionary"
75 conflicts=(hunspell-es)
77 LANG=en_US.utf8 bsdtar -xf es_$1.oxt
79 install -dm755 "$pkgdir"/usr/share/hunspell
80 install -Dm644 es_$1.dic es_$1.aff "$pkgdir/usr/share/hunspell"
82 install -d "$pkgdir"/usr/share/myspell/dicts
83 pushd "$pkgdir/usr/share/myspell/dicts"
84 for _file in "$pkgdir"/usr/share/hunspell/*; do
85 ln -sv /usr/share/hunspell/$(basename $_file) .
89 # Install webengine dictionaries
90 install -d "$pkgdir"/usr/share/qt{,6}/qtwebengine_dictionaries/
91 for _file in "$pkgdir"/usr/share/hunspell/*.dic; do
92 _filename=$(basename $_file)
93 /usr/lib/qt6/qwebengine_convert_dict $_file "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic}
94 ln -rs "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic} "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/
97 install -Dm644 README.txt -t "$pkgdir/usr/share/doc/$pkgname"
100 package_hunspell-es_any() {
101 pkgdesc="Spanish (generic) hunspell dictionary"
103 conflicts=(hunspell-es)
104 replaces=(hunspell-es)
106 LANG=en_US.utf8 bsdtar -xf es.oxt
108 install -Dm644 es.dic es.aff -t "$pkgdir"/usr/share/hunspell
110 install -d "${pkgdir}/usr/share/myspell/dicts"
111 pushd "$pkgdir/usr/share/myspell/dicts"
112 for file in "$pkgdir"/usr/share/hunspell/*; do
113 ln -sv /usr/share/hunspell/$(basename $file) .
117 # Install webengine dictionaries
118 install -d "$pkgdir"/usr/share/qt{,6}/qtwebengine_dictionaries/
119 for _file in "$pkgdir"/usr/share/hunspell/*.dic; do
120 _filename=$(basename $_file)
121 /usr/lib/qt6/qwebengine_convert_dict $_file "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic}
122 ln -rs "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic} "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/
125 install -Dm644 README.txt -t "$pkgdir/usr/share/doc/$pkgname"
128 package_hyphen-es() {
129 pkgdesc="Spanish hyphenation rules"
132 install -Dm644 hyph_es.dic -t "$pkgdir"/usr/share/hyphen/
134 pushd "$pkgdir"/usr/share/hyphen/
135 for _co in "${_countries[@]}"; do
136 ln -s hyph_es.dic hyph_es_${_co%% *}.dic
140 install -d "$pkgdir"/usr/share/myspell/dicts
141 pushd "$pkgdir"/usr/share/myspell/dicts
142 for file in "$pkgdir"/usr/share/hyphen/*; do
143 ln -sv /usr/share/hyphen/$(basename $file) .
147 install -Dm644 README_hyph_es.txt -t "$pkgdir"/usr/share/doc/$pkgname/
150 package_mythes-es() {
151 pkgdesc="Spanish thesaurus"
154 LANG=en_US.utf8 bsdtar -xf es.oxt
155 install -Dm644 th_es_v2.* -t "$pkgdir"/usr/share/mythes
157 pushd "$pkgdir"/usr/share/mythes/
158 for _co in "${_countries[@]}"; do
159 ln -s th_es_v2.idx "th_es_"${_co%% *}"_v2.idx" || true
160 ln -s th_es_v2.dat "th_es_"${_co%% *}"_v2.dat" || true
164 install -d "$pkgdir"/usr/share/myspell/dicts
165 pushd "$pkgdir"/usr/share/myspell/dicts
166 for file in "$pkgdir"/usr/share/mythes/*; do
167 ln -sv /usr/share/mythes/$(basename $file) .
171 install -Dm644 README_th_es.txt -t "$pkgdir"/usr/share/doc/$pkgname/