File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed
Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11build
2+ gocache
23Dockerfile
Original file line number Diff line number Diff line change 11build
2+ gocache /
23debian /changelog
34pkg /
45.vscode /
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ GOTEST = $(GOCMD) test -v
1313# Environment
1414WORKDIR := $(shell pwd)
1515BUILD_PATH := $(WORKDIR ) /build
16+ GOCACHE_PATH = $(WORKDIR ) /gocache
1617DOCKER_IMAGE_BUILD = mcuadros/octoprint-tft-build
1718
1819DEBIAN_PACKAGES = BUSTER
5354
5455build-environment :
5556 mkdir -p ${BUILD_PATH}
57+ mkdir -p ${GOCACHE_PATH}
5658
5759build : | build-environment $(DEBIAN_PACKAGES )
5860
@@ -65,14 +67,15 @@ $(DEBIAN_PACKAGES):
6567 && \
6668 docker run --rm \
6769 -e TARGET_ARCH=${ARCH} \
68- -v ${BUILD_PATH} /${${@ } _NAME} :/build \
70+ -v ${BUILD_PATH} /${${@ } _NAME} -${ARCH} :/build \
71+ -v ${GOCACHE_PATH} /${${@ } _NAME} -${ARCH} :/gocache \
6972 ${DOCKER_IMAGE_BUILD} :${${@ } _NAME} -${ARCH} \
7073 make build-internal
7174
7275build-internal : prepare-internal
7376 # go build --tags ${GO_TAGS} -v -o /build/bin/${BINARY_NAME} main.go
7477 cd $(WORKDIR ) ; \
75- debuild --prepend-path=/usr/local/go/bin/ --preserve-env -us -uc -a${TARGET_ARCH} ; \
78+ GOCACHE=/gocache debuild --prepend-path=/usr/local/go/bin/ --preserve-env -us -uc -a${TARGET_ARCH} ; \
7679 cp ../* .deb /build/;
7780
7881prepare-internal :
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ export DH_GOPKG := github.com/Z-Bolt/OctoScreen
77export DH_GOLANG_BUILDPKG := github.com/Z-Bolt/OctoScreen
88export DH_GOLANG_INSTALL_ALL := 1
99
10- export GOCACHE := $(GOPATH ) /pkg
1110export GOPROXY := https://proxy.golang.org
1211export GO111MODULE := on
1312
@@ -29,7 +28,6 @@ ifeq ($(_DH_GOLANG_WITH_CROSSBUILD_SUPPORT),0)
2928 export PKG_CONFIG_PATH := /usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
3029endif
3130
32-
3331% :
3432 dh $@ --buildsystem=golang --with=golang,systemd
3533
You can’t perform that action at this time.
0 commit comments