hunspell-en: English dictionaries for hunspell

This commit is contained in:
Alexpux
2014-12-10 00:52:10 +03:00
parent a3b3168b91
commit 656e014e4f

View File

@@ -0,0 +1,59 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=hunspell-en
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2014.11.17
pkgrel=1
pkgdesc="Hunspell dictionaries (mingw-w64)"
arch=('any')
url="http://wordlist.sourceforge.net/"
license=('LGPL' 'custom:scowl')
makedepends=("unzip")
optdepends=(${MINGW_PACKAGE_PREFIX}-hunspell)
source=(http://downloads.sourceforge.net/wordlist/hunspell-en_US-large-$pkgver.zip
http://downloads.sourceforge.net/wordlist/hunspell-en_CA-large-$pkgver.zip
http://downloads.sourceforge.net/wordlist/hunspell-en_GB-large-$pkgver.zip)
md5sums=('03394d04d58f0557dff6b3c2e0844532'
'539fc4150d0ed5d3e66fd05719c49b98'
'42ea3fe29ad43b4f62a558ad79c73d0d')
build() {
/bin/true
}
package() {
cd "$srcdir"
install -dm755 ${pkgdir}${MINGW_PREFIX}/share/hunspell
install -m644 en_*.dic en_*.aff ${pkgdir}${MINGW_PREFIX}/share/hunspell
pushd ${pkgdir}${MINGW_PREFIX}/share/hunspell/
en_GB_aliases="en_AG en_AU en_BS en_BW en_BZ en_DK en_GH en_HK en_IE en_IN en_JM en_NA en_NG en_NZ en_SG en_TT en_ZA en_ZW"
for lang in $en_GB_aliases; do
ln -s en_GB-large.aff $lang.aff
ln -s en_GB-large.dic $lang.dic
done
en_US_aliases="en_PH"
for lang in $en_US_aliases; do
ln -s en_US-large.aff $lang.aff
ln -s en_US-large.dic $lang.dic
done
popd
# the symlinks
install -dm755 ${pkgdir}${MINGW_PREFIX}/share/myspell/dicts
pushd ${pkgdir}${MINGW_PREFIX}/share/myspell/dicts
for file in ${pkgdir}${MINGW_PREFIX}/share/hunspell/*; do
ln -sv ${pkgdir}${MINGW_PREFIX}/share/hunspell/$(basename $file) .
done
popd
# docs
install -dm755 ${pkgdir}${MINGW_PREFIX}/share/doc/$_realname
install -m644 README_en_??-large.txt ${pkgdir}${MINGW_PREFIX}/share/doc/$_realname
# licenses
install -D -m644 README_en_US-large.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/Copyright_en_US
install -D -m644 README_en_CA-large.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/Copyright_en_CA
install -D -m644 README_en_GB-large.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/$_realname/Copyright_en_GB
}