actions.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 pisitools
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. shelltools.export("DISABLE_WARN_OUTSIDE_CONTAINER", "1")
  11. shelltools.export("AUTO_GOPATH", "1")
  12. shelltools.export("DOCKER_GITCOMMIT","f9522e5")
  13. shelltools.export("IAMSTATIC", "false")
  14. shelltools.export("VERSION", "27.1.2")
  15. shelltools.export("GOROOT","/usr/lib/go")
  16. shelltools.export("GO111MODULE","off")
  17. # shelltools.export("GOPATH", "%s/cli-%s" % (get.workDIR(), get.srcVERSION()))
  18. shelltools.export("GOPATH", "%s" % get.workDIR())
  19. shelltools.export("CGO_CFLAGS", "-I/usr/include")
  20. shelltools.export("CGO_LDFLAGS", "-L/usr/lib")
  21. shelltools.export("DOCKER_BUILDTAGS","seccomp")
  22. NoStrip=["/"]
  23. def setup():
  24. shelltools.cd("%s" % get.workDIR())
  25. shelltools.move("cli-*", "cli")
  26. shelltools.cd("%s" % get.workDIR())
  27. shelltools.move("moby-*", "engine")
  28. shelltools.cd("%s" % get.workDIR())
  29. shelltools.move("docker-ce-packaging-19.03.13", "packaging")
  30. # shelltools.copy( "../moby-%s/*" % get.srcVERSION(), "engine")
  31. shelltools.makedirs("cli/src/github.com/docker/docker")
  32. shelltools.cd("cli/src/github.com/docker")
  33. shelltools.system("ln -s ../../../../cli . ")
  34. def build():
  35. shelltools.cd("%s" % get.workDIR())
  36. shelltools.cd("engine")
  37. # shelltools.makedirs("github.com/docker/docker")
  38. # shelltools.system("make VERSION=%s dynbinary-daemon" % get.srcVERSION())
  39. shelltools.system("hack/make.sh dynbinary")
  40. # shelltools.system("make.sh dynbinary-daemon")
  41. # build
  42. shelltools.cd("%s" % get.workDIR())
  43. shelltools.cd("cli")
  44. shelltools.system("LDFLAGS='' GOPATH=%s/cli ./scripts/build/binary" % get.workDIR())
  45. def install():
  46. shelltools.cd("%s/cli" % get.workDIR())
  47. pisitools.dobin("build/docker*")
  48. shelltools.cd("%s" % get.workDIR())
  49. pisitools.dobin("engine/bundles/dynbinary-daemon/*")
  50. # insert udev rules
  51. pisitools.insinto("/lib/udev/rules.d", "engine/contrib/udev/*.rules")
  52. #insert contrib in docs
  53. pisitools.insinto("/usr/share/doc/docker", "cli/contrib")
  54. pisitools.dobin("engine/contrib/check-config.sh")
  55. shelltools.cd("%s/cli" % get.workDIR())
  56. pisitools.dodoc("VERSION", "README.md","CONTRIBUTING.md")