Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=38975f16a18543588f7094ff03907f46fe5392e0

commit 38975f16a18543588f7094ff03907f46fe5392e0
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Tue Feb 19 07:16:35 2013 +0100

hunspell-be-1.1-1-x86_64

- replace aspell5-be

diff --git a/source/locale-extra/hunspell-be/FrugalBuild 
b/source/locale-extra/hunspell-be/FrugalBuild
new file mode 100644
index 0000000..db090a7
--- /dev/null
+++ b/source/locale-extra/hunspell-be/FrugalBuild
@@ -0,0 +1,27 @@
+# Compiling time: 0.01 SBU
+# Maintainer: CSÉCSY László <boo...@frugalware.org>
+
+lang=be_BY
+pkgname=hunspell-be
+pkgver=1.1
+pkgrel=1
+pkgdesc="Belarusian dictionary for Hunspell"
+url="http://extensions.services.openoffice.org/project/dict-be-official";
+rodepends=('hunspell>=1.1.3')
+provides=('hunspell-dict')
+replace=('aspell5-be')
+groups=('locale-extra')
+archs=('i686' 'x86_64')
+up2date="lynx -dump $url |grep Version:|sed 's/.*]//'"
+source=(http://extensions.services.openoffice.org/files/2412/1/dict-be-official.oxt)
+install=$pkgname.install
+sha1sums=('6c3a7975f37d7b0f94520fa31acc7a48a83027a3')
+
+build() {
+       unzip dict-be-official.oxt
+       sed -i -e "s/microsoft-cp1251/CP1251/g" be-official.aff hyph_be_BY.dic
+       tail -n +3 hyph_be_BY.dic| head -n 3 > README_hyph_be_BY
+       Ffilerel be-official.aff /usr/share/myspell/be_BY.aff
+       Ffilerel be-official.dic /usr/share/myspell/be_BY.dic
+       Ffilerel hyph_be_BY.dic /usr/share/hyphen/hyph_be_BY.dic
+}
diff --git a/source/locale-extra/hunspell-be/hunspell-be.install 
b/source/locale-extra/hunspell-be/hunspell-be.install
new file mode 100644
index 0000000..fc7faa2
--- /dev/null
+++ b/source/locale-extra/hunspell-be/hunspell-be.install
@@ -0,0 +1,47 @@
+PLANG=be_BY
+post_install()
+{
+       # oldskull alternatives: bye-bye
+       if [ $(readlink /usr/share/myspell/default.aff | grep alternatives) ]; 
then
+               rm -f /usr/share/myspell/default.aff
+       fi
+       if [ $(readlink /usr/share/myspell/default.dic | grep alternatives) ]; 
then
+               rm -f /usr/share/myspell/default.dic
+       fi
+       rm -f /etc/alternatives/default.{aff,dic}
+       # if there is no default dictionary, then install one
+       if [ ! -L /usr/share/myspell/default.aff ]; then
+               ln -s /usr/share/myspell/$PLANG.aff 
/usr/share/myspell/default.aff
+       fi
+       if [ ! -L /usr/share/myspell/default.dic ]; then
+               ln -s /usr/share/myspell/$PLANG.dic 
/usr/share/myspell/default.dic
+       fi
+}
+
+post_remove()
+{
+       # if we removed the default, then set up a new default (if any)
+       if [ "$(readlink /usr/share/myspell/default.aff)" == 
"/usr/share/myspell/$PLANG.aff" ]; then
+               rm -f /usr/share/myspell/default.aff
+               if [ -e /usr/share/myspell/*.aff ]; then
+                       ln -s $(ls -1 /usr/share/myspell/*.aff 2>/dev/null | 
grep -v default | head -n 1 | sed 's/\*//') /usr/share/myspell/default.aff
+               fi
+       fi
+       if [ "$(readlink /usr/share/myspell/default.dic)" == 
"/usr/share/myspell/$PLANG.dic" ]; then
+               rm -f /usr/share/myspell/default.dic
+               if [ -e /usr/share/myspell/*.dic ]; then
+                       ln -s $(ls -1 /usr/share/myspell/*.dic 2>/dev/null | 
grep -v default | head -n 1 | sed 's/\*//') /usr/share/myspell/default.dic
+               fi
+       fi
+}
+
+post_upgrade()
+{
+       post_install
+}
+
+op=$1
+shift
+$op $*
+
+# vim: ft=sh
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to