actions.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/usr/bin/env python3
  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 inary.actionsapi import inarytools
  7. from inary.actionsapi import autotools
  8. from inary.actionsapi import shelltools
  9. from inary.actionsapi import get
  10. shelltools.export("AUTO_GOPATH", "1")
  11. shelltools.export("IAMSTATIC", "false")
  12. shelltools.export("DOCKER_GITCOMMIT","633a0ea")
  13. shelltools.export("VERSION", "19.03.5")
  14. shelltools.export("GOROOT","/usr/lib/go")
  15. shelltools.export("GOPATH", "%s" % get.workDIR())
  16. shelltools.export("CGO_CFLAGS", "-I/usr/include")
  17. shelltools.export("CGO_LDFLAGS", "-L/usr/lib")
  18. shelltools.export("DOCKER_BUILDTAGS","apparmor seccomp")
  19. NoStrip=["/"]
  20. def setup():
  21. shelltools.makedirs("components/cli/src/github.com/docker")
  22. shelltools.cd("components/cli/src/github.com/docker")
  23. shelltools.system("ln -s ../../../../cli . ")
  24. def build():
  25. shelltools.cd("%s" % get.workDIR())
  26. shelltools.cd("docker-ce-%s/components/engine" % get.srcVERSION())
  27. shelltools.system("hack/make.sh dynbinary-daemon")
  28. # build cli
  29. shelltools.cd("%s" % get.workDIR())
  30. shelltools.cd("docker-ce-%s/components/cli" % get.srcVERSION())
  31. shelltools.system("LDFLAGS='' GOPATH=%s/docker-ce-%s/components/cli ./scripts/build/dynbinary" % (get.workDIR(), get.srcVERSION()))
  32. def install():
  33. shelltools.cd("%s/docker-ce-%s" % (get.workDIR(), get.srcVERSION()))
  34. inarytools.dobin("components/cli/build/docker*")
  35. inarytools.dobin("components/engine/bundles/dynbinary-daemon/*")
  36. # insert udev rules
  37. inarytools.insinto("/lib/udev/rules.d", "components/engine/contrib/udev/*.rules")
  38. #insert contrib in docs
  39. inarytools.insinto("/usr/share/doc/docker", "components/cli/contrib")
  40. inarytools.dobin("components/engine/contrib/check-config.sh")
  41. inarytools.dodoc("VERSION", "README.md","CONTRIBUTING.md", "CHANGELOG.md")