deb.rules 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/make -f
  2. # -*- makefile -*-
  3. # Uncomment this to turn on verbose mode.
  4. #export DH_VERBOSE=1
  5. # Launchpad rejects Go's access to $HOME, use custom folders
  6. export GOCACHE=/tmp/go-build
  7. export GOPATH=/tmp/gopath
  8. export GOROOT_BOOTSTRAP={{.GoBootPath}}
  9. override_dh_auto_clean:
  10. # Don't try to be smart Launchpad, we know our build rules better than you
  11. override_dh_auto_build:
  12. # We can't download a fresh Go within Launchpad, so we're shipping and building
  13. # one on the fly. However, we can't build it inside the go-ethereum folder as
  14. # bootstrapping clashes with go modules, so build in a sibling folder.
  15. (mv .go ../ && cd ../.go/src && ./make.bash)
  16. # We can't download external go modules within Launchpad, so we're shipping the
  17. # entire dependency source cache with go-ethereum.
  18. mkdir -p $(GOPATH)/pkg
  19. mv .mod $(GOPATH)/pkg/mod
  20. # A fresh Go was built, all dependency downloads faked, hope build works now
  21. ../.go/bin/go run build/ci.go install -git-commit={{.Env.Commit}} -git-branch={{.Env.Branch}} -git-tag={{.Env.Tag}} -buildnum={{.Env.Buildnum}} -pull-request={{.Env.IsPullRequest}}
  22. override_dh_auto_test:
  23. %:
  24. dh $@