actions.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Copyright (C) 2018 Suleyman POYRAZ (Zaryob)
  5. # Licensed under the GNU General Public License, version 2.
  6. # See the file http://www.gnu.org/copyleft/gpl.txt.
  7. from inary.actionsapi import autotools
  8. from inary.actionsapi import inarytools
  9. from inary.actionsapi import shelltools
  10. from inary.actionsapi import get
  11. shelltools.export("DOCKER_BUILDTAGS","seccomp apparmor")
  12. shelltools.export("BINDIR","/usr/bin")
  13. def setup():
  14. shelltools.cd("%s" % get.workDIR())
  15. shelltools.move("runc-*", "runc")
  16. shelltools.cd("runc")
  17. shelltools.move("vendor", "src")
  18. shelltools.makedirs("src/github.com/opencontainers")
  19. shelltools.cd("src/github.com/opencontainers")
  20. shelltools.system("ln -rsf %s/runc ./runc" % get.workDIR())
  21. def build():
  22. shelltools.cd("%s/runc/src/github.com/opencontainers/runc" % get.workDIR())
  23. build_runc = "GOPATH=%s/runc make" % get.workDIR()
  24. shelltools.system(build_runc)
  25. def install():
  26. inarytools.dobin("runc")
  27. inarytools.dosym("/usr/bin/runc", "/usr/bin/docker-runc")
  28. inarytools.insinto("/usr/share/doc/runc", "contrib")
  29. inarytools.dodoc("MAINTAINERS", "README*")