actions.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Copyright 2016 TUBITAK/UEKAE
  5. # Licensed under the GNU General Public License, version 2.
  6. # See the file http://www.gnu.org/copyleft/gpl.txt.
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import get
  11. #shelltools.export("GOPATH", "%s" % get.curDIR())
  12. shelltools.export("DOCKER_BUILDTAGS","seccomp")
  13. shelltools.export("COMMIT"," 860f061")
  14. shelltools.export("BINDIR","/usr/bin")
  15. def setup():
  16. shelltools.cd("%s" % get.workDIR())
  17. # shelltools.move("runc-*", "runc")
  18. # shelltools.cd("runc")
  19. #shelltools.move("vendor", "src")
  20. shelltools.export("GOPATH", "%s" % get.workDIR())
  21. shelltools.makedirs("%s/src/github.com/opencontainers/runc" % get.workDIR())
  22. # shelltools.cd("src/github.com/opencontainers")
  23. # shelltools.system("ln -rsf %s/runc ./runc" % get.workDIR())
  24. shelltools.copy("%s/runc-%s/*" % (get.workDIR(), get.srcVERSION()), "%s/src/github.com/opencontainers/runc/" % get.workDIR())
  25. def build():
  26. # shelltools.cd("%s" % get.workDIR())
  27. shelltools.cd("%s/src/github.com/opencontainers/runc" % get.workDIR())
  28. build_runc = "make GOPATH=/runc COMMIT=860f061"
  29. shelltools.system(build_runc)
  30. def install():
  31. shelltools.cd("%s/src/github.com/opencontainers/runc" % get.workDIR())
  32. pisitools.dobin("runc")
  33. # symlink containerd/run (nice integration with docker)
  34. pisitools.dosym("/usr/bin/runc", "/usr/bin/docker-runc")
  35. #insert completions in doc
  36. #pisitools.insinto("/usr/share/doc/runc", "contrib")
  37. pisitools.dodoc("MAINTAINERS", "README*")