actions.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/copyleft/gpl.txt
  5. from pisi.actionsapi import get
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import shelltools
  8. NoStrip = ["/usr"]
  9. IgnoreAutodep = True
  10. Version = get.srcVERSION()
  11. def setup():
  12. # shelltools.system("pwd")
  13. shelltools.system("ar xf opera-developer_55.0.2962.0_amd64.deb")
  14. shelltools.system("tar xvf data.tar.xz")
  15. def install():
  16. # root owns sandbox as it is setuid
  17. shelltools.system("chown root:root usr/lib/x86_64-linux-gnu/opera-developer/opera_sandbox")
  18. # ensure setuid
  19. shelltools.system("chmod 4755 usr/lib/x86_64-linux-gnu/opera-developer/opera_sandbox")
  20. pisitools.insinto("/", "usr")
  21. # Because ew.
  22. pisitools.move("%s/usr/lib/x86_64-linux-gnu/*" % get.installDIR(), "%s/usr/lib" % get.installDIR())
  23. pisitools.removeDir("/usr/lib/x86_64-linux-gnu")
  24. pisitools.removeDir("/usr/share/lintian")
  25. pisitools.remove("/usr/bin/opera-developer")
  26. pisitools.insinto("/usr/bin/", "./usr/lib/x86_64-linux-gnu/opera-developer/opera-developer")