actions.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 get
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. WorkDir = "."
  10. NoStrip = ["/"]
  11. Release = "-1"
  12. def setup():
  13. shelltools.system("ar xf google-chrome-stable_current_amd64.deb")
  14. shelltools.system("tar xvf %s/data.tar.xz --exclude=usr/share/gnome-control-center --exclude=usr/bin --exclude=etc" %get.workDIR())
  15. shelltools.chmod(get.workDIR() + "/opt/google/chrome/*", 0755)
  16. def install():
  17. pisitools.insinto("/opt/", "./opt/*")
  18. pisitools.insinto("/usr/", "./usr/*")
  19. shelltools.system("chmod -v 4755 %s/opt/google/chrome/chrome-sandbox" %get.installDIR())
  20. pisitools.dosym("/opt/google/chrome/google-chrome", "/usr/bin/google-chrome-stable")
  21. #pisitools.dosym("/opt/google/chrome/google-chrome.desktop", "/usr/share/applications/google-chrome.desktop")
  22. pisitools.dosym("/opt/google/chrome/product_logo_32.xpm", "/usr/share/pixmaps/google-chrome.xpm")
  23. pisitools.dosym("/opt/google/chrome/product_logo_256.png", "/usr/share/pixmaps/google-chrome.png")
  24. pisitools.dosym("/usr/lib/nss/libnss3.so", "/usr/lib/libnss3.so.1d")
  25. pisitools.dosym("/usr/lib/nss/libnssutil3.so", "/usr/lib/libnssutil3.so.1d")
  26. pisitools.dosym("/usr/lib/nss/libsmime3.so", "/usr/lib/libsmime3.so.1d")
  27. pisitools.dosym("/usr/lib/nss/libssl3.so", "/usr/lib/libssl3.so.1d")
  28. pisitools.dosym("/usr/lib/libplds4.so", "/usr/lib/libplds4.so.0d")
  29. pisitools.dosym("/usr/lib/libplc4.so", "/usr/lib/libplc4.so.0d")
  30. pisitools.dosym("/usr/lib/libnspr4.so", "/usr/lib/libnspr4.so.0d")
  31. pisitools.dosym("/lib/libbz2.so", "/usr/lib/libbz2.so.1.0")
  32. pisitools.dosym("/usr/lib/libudev.so", "/opt/google/chrome/libudev.so.0")