actions.py 827 B

1234567891011121314151617181920212223
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import get
  9. import glob
  10. WorkDir="."
  11. def install():
  12. hunspell_tr = "/usr/lib/libreoffice/share/extensions/hunspell_tr"
  13. pisitools.dodir(hunspell_tr)
  14. hunspellfile = glob.glob("*.oxt")[0]
  15. shelltools.system("unzip %s -d %s/%s" % (hunspellfile, get.installDIR(), hunspell_tr))
  16. #for other applications
  17. pisitools.dosym("/usr/lib/libreoffice/share/extensions/hunspell_tr/dictionaries/tr-TR.aff","/usr/share/hunspell/tr-TR.aff")
  18. pisitools.dosym("/usr/lib/libreoffice/share/extensions/hunspell_tr/dictionaries/tr-TR.dic", "/usr/share/hunspell/tr-TR.dic")