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

commit 209c7e035a98cbd423fb1e7fb22d36c461f81994
Author: Miklos Vajna <[email protected]>
Date:   Sun Apr 21 13:57:09 2013 +0200

hunspell-br-0.8-1-x86_64

- replace aspell-br

diff --git a/source/locale-extra/hunspell-br/FrugalBuild 
b/source/locale-extra/hunspell-br/FrugalBuild
new file mode 100644
index 0000000..da9b1c7
--- /dev/null
+++ b/source/locale-extra/hunspell-br/FrugalBuild
@@ -0,0 +1,25 @@
+# Compiling time: 0.01 SBU
+# Maintainer: CSÉCSY László <[email protected]>
+
+pkgname=hunspell-br
+pkgver=0.8
+pkgrel=1
+pkgdesc="Breton dictionary for Hunspell"
+url="http://www.drouizig.org/";
+rodepends=('hunspell>=1.1.3')
+provides=('hunspell-dict')
+replaces=('aspell-br')
+groups=('locale-extra')
+archs=('i686' 'x86_64')
+up2date="$pkgver"
+source=(http://pkgs.fedoraproject.org/lookaside/pkgs/hunspell-br/dict-br_0.8.oxt/df5afe669828bf8d4a205cad419fa901/dict-br_0.8.oxt)
+install=$pkgname.install
+sha1sums=('744d59a23e80cd9c0ac9e1e2942d62c5108b205c')
+
+build() {
+       unzip dict-br_0.8.oxt
+       chmod -x dictionaries/*
+       cd dictionaries
+       Ffilerel /usr/share/myspell/br_FR.aff
+       Ffilerel /usr/share/myspell/br_FR.dic
+}
diff --git a/source/locale-extra/hunspell-br/hunspell-br.install 
b/source/locale-extra/hunspell-br/hunspell-br.install
new file mode 100644
index 0000000..d421d0f
--- /dev/null
+++ b/source/locale-extra/hunspell-br/hunspell-br.install
@@ -0,0 +1,47 @@
+PLANG=br_FR
+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
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to