actions.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. WorkDir = "playonlinux"
  10. NoStrip = "/"
  11. datadir = "/usr/share"
  12. def install():
  13. installdir = get.installDIR()+ datadir
  14. pisitools.dodir(datadir)
  15. pisitools.dodir("%s/applications" % datadir)
  16. shelltools.copytree("%s/playonlinux" % get.workDIR(), "%s/" % installdir)
  17. pisitools.dobin("%s/playonlinux/playonlinux" % installdir)
  18. pisitools.domo("%s/playonlinux/lang/po/tr.po" % installdir, "tr", "pol.mo")
  19. # pisitools.domove("usr/share/locale/tr/LC_MESSAGES", "/usr/share/playonlinux/lang/locale/tr")
  20. pisitools.dodoc("%s/playonlinux/LICENCE" % installdir, "%s/playonlinux/CHANGELOG.*" % installdir)
  21. shelltools.move("%s/etc/PlayOnLinux.desktop" % (get.installDIR() + "/usr/share/playonlinux"), "%s/usr/share/applications/PlayOnLinux.desktop" % get.installDIR())
  22. shelltools.unlink("%s/usr/bin/playonlinux" % get.installDIR())
  23. shelltools.sym("%s/usr/share/playonlinux/playonlinux" % get.installDIR(), "%s/usr/bin/playonlinux" % get.installDIR() )
  24. pisitools.dosed("playonlinux", "python2.6 mainwindow.py", "python2.8 mainwindow.py")