actions.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. def build():
  12. shelltools.export("GOPATH", "%s" % get.workDIR())
  13. shelltools.cd("%s" % get.workDIR())
  14. shelltools.move("containerd-*", "containerd")
  15. shelltools.cd("containerd")
  16. shelltools.move("vendor", "src")
  17. shelltools.makedirs("src/github.com/containerd")
  18. shelltools.system("ln -rsf %s/containerd* src/github.com/containerd" % get.workDIR())
  19. shelltools.cd("src/github.com/containerd/containerd")
  20. shelltools.system("LDFLAGS= GOPATH=%s make GIT_COMMIT=209a7fc" % get.curDIR())
  21. def install():
  22. shelltools.cd("%s/containerd" % get.workDIR())
  23. inarytools.dobin("bin/*")
  24. inarytools.dosym("/usr/bin/containerd", "/usr/bin/docker-containerd")
  25. inarytools.dosym("/usr/bin/containerd-shim", "/usr/bin/docker-containerd-shim")
  26. inarytools.dosym("/usr/bin/ctr", "/usr/bin/docker-containerd-ctr")
  27. inarytools.dodoc("LICENSE*", "README*")