From 903cb0500f31b08b1e6bfe40c1db0c910e3fa4fd Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sun, 15 Sep 2019 17:30:58 +0000 Subject: [PATCH] added extra/hspell --- extra/hspell/PKGBUILD | 69 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 extra/hspell/PKGBUILD diff --git a/extra/hspell/PKGBUILD b/extra/hspell/PKGBUILD new file mode 100644 index 000000000..7aa8c5e6a --- /dev/null +++ b/extra/hspell/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Tobias Powalowski + +# ALARM: Kevin Mihelich +# - makedepend on qt5-webengine for v7/v8 only +# - only install webengine dictionaries on v7/v8 + +pkgbase=hspell +pkgname=('hspell' 'hunspell-he') +pkgver=1.4 +pkgrel=2 +arch=('x86_64') +license=('GPL') +url="http://www.ivrix.org.il/projects/spell-checker/" +makedepends=('glibc' 'zlib' 'perl' 'hunspell' 'gawk') +makedepends_armv7h=('qt5-webengine') +makedepends_aarch64=('qt5-webengine') +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 + + rm -f ${pkgdir}/usr/lib/libhspell.a +} + +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 + pushd $pkgdir/usr/share/myspell/dicts + for file in $pkgdir/usr/share/hunspell/*; do + ln -sv /usr/share/hunspell/$(basename $file) . + done + popd + +# Install webengine dictionaries + if [[ $CARCH == "armv7h" || $CARCH == "aarch64" ]]; then + install -d "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/ + for _file in "$pkgdir"/usr/share/hunspell/*.dic; do + _filename=$(basename $_file) + qwebengine_convert_dict $_file "$pkgdir"/usr/share/qt/qtwebengine_dictionaries/${_filename/\.dic/\.bdic} + done + fi +}