PKGBUILDs/extra/hspell/PKGBUILD

71 lines
2.1 KiB
Bash
Raw Normal View History

2019-09-15 17:30:58 +00:00
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - makedepend on qt5-webengine for v7/v8 only
# - only install webengine dictionaries on v7/v8
pkgbase=hspell
pkgname=('hspell' 'hunspell-he')
pkgver=1.4
2021-10-01 20:25:00 +00:00
pkgrel=4
2019-09-15 17:30:58 +00:00
arch=('x86_64')
license=('GPL')
url="http://www.ivrix.org.il/projects/spell-checker/"
makedepends=('glibc' 'zlib' 'perl' 'hunspell' 'gawk')
2021-10-01 20:25:00 +00:00
makedepends_armv7h=('qt6-webengine')
makedepends_aarch64=('qt6-webengine')
2019-09-15 17:30:58 +00:00
options=('!makeflags')
source=(http://hspell.ivrix.org.il/${pkgname}-${pkgver}.tar.gz{,.sig})
sha256sums=('7310f5d58740d21d6d215c1179658602ef7da97a816bc1497c8764be97aabea3'
'SKIP')
validpgpkeys=('996512CD85DC510BD45EAD46415E26D84D4E37DB')
build() {
cd ${pkgname}-${pkgver}
export PERLLIB="$PWD"
./configure --prefix=/usr --mandir=/usr/share/man \
--enable-linginfo --enable-fatverb --enable-shared
make
make hunspell
}
package_hspell() {
pkgdesc="Hebrew spell-checker"
depends=('glibc' 'zlib' 'perl')
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
2021-10-01 20:25:00 +00:00
rm -f "${pkgdir}"/usr/lib/libhspell.a
2019-09-15 17:30:58 +00:00
}
package_hunspell-he() {
pkgdesc="Hebrew hunspell dictionary"
cd ${pkgbase}-${pkgver}
install -dm755 "$pkgdir"/usr/share/hunspell
install -m644 he.dic "$pkgdir"/usr/share/hunspell/he_IL.dic
install -m644 he.aff "$pkgdir"/usr/share/hunspell/he_IL.aff
# the symlinks
install -dm755 "$pkgdir"/usr/share/myspell/dicts
2021-10-01 20:25:00 +00:00
pushd "$pkgdir"/usr/share/myspell/dicts
for file in "$pkgdir"/usr/share/hunspell/*; do
2019-09-15 17:30:58 +00:00
ln -sv /usr/share/hunspell/$(basename $file) .
done
popd
2021-10-01 20:25:00 +00:00
# Install webengine dictionaries
2019-09-15 17:30:58 +00:00
if [[ $CARCH == "armv7h" || $CARCH == "aarch64" ]]; then
2021-10-01 20:25:00 +00:00
install -d "$pkgdir"/usr/share/qt{,6}/qtwebengine_dictionaries/
2019-09-15 17:30:58 +00:00
for _file in "$pkgdir"/usr/share/hunspell/*.dic; do
_filename=$(basename $_file)
2021-10-01 20:25:00 +00:00
/usr/lib/qt6/qwebengine_convert_dict $_file "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic}
ln -rs "$pkgdir"/usr/share/qt6/qtwebengine_dictionaries/${_filename/\.dic/\.bdic} "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/
2019-09-15 17:30:58 +00:00
done
fi
}