summaryrefslogtreecommitdiff
path: root/office/hunspell-es/hunspell-es.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/hunspell-es/hunspell-es.SlackBuild')
-rw-r--r--office/hunspell-es/hunspell-es.SlackBuild49
1 files changed, 43 insertions, 6 deletions
diff --git a/office/hunspell-es/hunspell-es.SlackBuild b/office/hunspell-es/hunspell-es.SlackBuild
index 04080d26bb..a80bc5dc48 100644
--- a/office/hunspell-es/hunspell-es.SlackBuild
+++ b/office/hunspell-es/hunspell-es.SlackBuild
@@ -2,7 +2,8 @@
# Slackware build script for hunspell-es
-# Copyright 2014, Pablo Santamaria (pablosantamaria@gmail.com)
+# Copyright 2017 Dhaby Xiloj <slack.dhabyx@gmail.com>
+# Copyright 2014-2017 Pablo Santamaria (pablosantamaria@gmail.com)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +26,7 @@
# Based on the Arch PKGBUILD
PRGNAM=hunspell-es
-VERSION=${VERSION:-7.1}
+VERSION=${VERSION:-2.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
ARCH="noarch"
@@ -35,6 +36,10 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+# Getting all localizations available
+LOCALIZATIONS=*.oxt
+LOCALIZATIONS=$(echo $LOCALIZATIONS | sed -e 's/es_ANY.oxt//g' | sed -e 's/.oxt//g')
+
set -e
rm -rf $PKG
@@ -45,21 +50,53 @@ mkdir -p $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
for file in $CWD/*.oxt ; do
- unzip -B $file
+ LANG=en_US.utf8 bsdtar -xf $file
done
+# Putting everything in proper place
install -dm755 $PKG/usr/share/hunspell
install -m644 es_*.dic es_*.aff $PKG/usr/share/hunspell
+install -Dm644 hyph_es_ANY.dic $PKG/usr/share/hyphen/hyph_es_ANY.dic
+install -dm755 $PKG/usr/share/mythes
+install -m644 th_es_ES_v2.* $PKG/usr/share/mythes
+# Symlinks for ditcs
install -dm755 $PKG/usr/share/myspell/dicts
pushd $PKG/usr/share/myspell/dicts
-for file in $PKGDIR/usr/share/hunspell/*; do
+ for file in $PKG/usr/share/hunspell/*; do
ln -sv ../../hunspell/$(basename $file) .
-done
+ done
+popd
+
+# Hypernation symlinks
+pushd $PKG/usr/share/hyphen/
+ echo $LOCALIZATIONS
+ for lang in $LOCALIZATIONS; do
+ ln -sv hyph_es_ANY.dic hyph_${lang}.dic
+ done
+popd
+
+# Thesaurus symlinks
+pushd $PKG/usr/share/mythes/
+ for lang in $(echo $LOCALIZATIONS | sed -e 's/es_ES//g'); do
+ ln -sv th_es_ES_v2.idx th_${lang}_v2.idx
+ ln -sv th_es_ES_v2.dat th_${lang}_v2.dat
+ done
+popd
+
+# myspell symlinks
+install -dm755 $PKG/usr/share/myspell/dicts
+pushd $PKG/usr/share/myspell/dicts
+ for file in $PKG/usr/share/hyphen/*; do
+ ln -sv ../../hyphen/$(basename $file) .
+ done
+ for file in $PKG/usr/share/mythes/*; do
+ ln -sv ../../mythes/$(basename $file) .
+ done
popd
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-install -m644 README.txt $PKG/usr/doc/$PRGNAM-$VERSION
+install -m644 README* COPYING* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install