Skip to content

Commit

Permalink
Support for building deb package for ARM
Browse files Browse the repository at this point in the history
Signed-off-by: Ritika Srivastava <[email protected]>
  • Loading branch information
ritikasrivastava committed Oct 31, 2024
1 parent a561a12 commit ed3684f
Show file tree
Hide file tree
Showing 2 changed files with 264 additions and 156 deletions.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ build: proto
$(CMD_DIR)/$${target}; \
done

.PHONY: build-arm64
build-arm64: proto
@echo "Building for arm64"
@for target in $(TARGETS); do \
echo "Building $${target}"; \
GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 go build -a -o $(OUTPUT_DIR)/$${target} \
-ldflags '-extldflags "-static" -X main.GitTag=$(GIT_REF)' \
$(CMD_DIR)/$${target}; \
done


.PHONY: clean
clean:
scripts/clean-build.sh
Expand Down Expand Up @@ -88,6 +99,10 @@ ssl:
deb: build
scripts/build-deb.sh $(GIT_REF)

.PHONY: deb-arm64
deb-arm64: build-arm64
ARCH=arm64 scripts/build-deb-arm64.sh $(GIT_REF)

.PHONY: rpm
rpm: build
scripts/build-rpm.sh $(GIT_REF)
Loading

0 comments on commit ed3684f

Please sign in to comment.