1 # Maintainer: Bruno Pagani <archange@archlinux.org>
6 pkgdesc="French (classic/modern) hunspell dictionaries"
8 url="https://grammalecte.net/download.php?prj=fr"
10 makedepends=(qt6-webengine)
11 optdepends=('hunspell: the spell checking libraries and apps')
12 source=("https://grammalecte.net/download/fr/${pkgname/-fr/}-french-dictionaries-v${pkgver}.zip")
13 sha256sums=('eb7ac36dc14b9c3e3c0cabae0f90304a137da8e6ae607bcaf56d65720fbd097f')
16 install -Dm644 fr-classique.dic "${pkgdir}"/usr/share/hunspell/fr_FR.dic
17 install -Dm644 fr-classique.aff "${pkgdir}"/usr/share/hunspell/fr_FR.aff
19 pushd "${pkgdir}"/usr/share/hunspell/
20 fr_FR_aliases="fr_BE fr_CA fr_CH fr_LU"
21 for lang in ${fr_FR_aliases}; do
22 ln -s fr_FR.aff ${lang}.aff
23 ln -s fr_FR.dic ${lang}.dic
28 install -dm755 "${pkgdir}"/usr/share/myspell/dicts
29 pushd "${pkgdir}"/usr/share/myspell/dicts
30 for file in "${pkgdir}"/usr/share/hunspell/*; do
31 ln -sv /usr/share/hunspell/$(basename ${file}) .
36 install -Dm644 README_dict_fr.txt -t "${pkgdir}"/usr/share/doc/${pkgname}/
38 # Install webengine dictionaries
39 install -d "$pkgdir"/usr/share/qt{,6}/qtwebengine_dictionaries/
40 for _file in "$pkgdir"/usr/share/hunspell/*.dic; do
41 _filename=$(basename $_file)
42 /usr/lib/qt6/qwebengine_convert_dict $_file "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic}
43 ln -rs "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic} "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/