1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
4 # https://cgit.freedesktop.org/libreoffice/dictionaries/log/en
5 _commit=81c820ae2e0f447d3bd71855c3bc7e8912740d11 # last commit "en" subdir - 2022-11-02
8 pkgdesc="English thesaurus"
10 url="https://wiki.documentfoundation.org/Development/Dictionaries"
12 makedepends=('git' 'libmythes')
13 optdepends=('libmythes: offers thesaurus library functions')
14 source=("git+https://anongit.freedesktop.org/git/libreoffice/dictionaries.git#commit=$_commit")
20 install -dm755 "${pkgdir}"/usr/share/mythes
21 cp -p th_en_US_v2.* "$pkgdir"/usr/share/mythes
23 pushd "$pkgdir"/usr/share/mythes/
24 # create sorted index *.idx file from structured thesaurus file
25 for lang in `find -type f -name "*.dat" -printf '%P\n'`; do
26 cat "${lang}" | /usr/bin/th_gen_idx.pl > "${lang/.dat/}".idx
29 en_US_aliases="en_AG en_AU en_BS en_BW en_BZ en_CA en_DK en_GB en_GH en_IE en_IN en_JM en_NA en_NG en_NZ en_PH en_SG en_TT en_ZA en_ZW"
30 for lang in $en_US_aliases; do
31 ln -s th_en_US_v2.idx th_"$lang"_v2.idx
32 ln -s th_en_US_v2.dat th_"$lang"_v2.dat
37 install -dm755 "${pkgdir}"/usr/share/myspell/dicts
38 pushd "$pkgdir"/usr/share/myspell/dicts
39 for file in "$pkgdir"/usr/share/mythes/*; do
40 ln -sv /usr/share/mythes/$(basename $file) .
45 install -dm755 "${pkgdir}"/usr/share/doc/$pkgname
46 cp -p README_en_GB_thes.txt "$pkgdir"/usr/share/doc/$pkgname