diff options
author | techknowlogick <techknowlogick@gitea.io> | 2023-01-10 17:21:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 17:21:24 -0500 |
commit | dc5f2cf5906ec2f87ad47ea4724cc245c401eef6 (patch) | |
tree | 88b4054c2274f8054ab949ebad49ffad9c737c9e /Makefile | |
parent | 70043da3ddc2164d1549a1246c1f9f0bb6ad2485 (diff) | |
download | gitea-dc5f2cf5906ec2f87ad47ea4724cc245c401eef6.tar.gz gitea-dc5f2cf5906ec2f87ad47ea4724cc245c401eef6.zip |
cgo cross-compile for freebsd (#22397)
Provide pre-compiled cgo binaries for freebsd
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -751,7 +751,7 @@ $(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ) CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ .PHONY: release -release: frontend generate release-windows release-linux release-darwin release-copy release-compress vendor release-sources release-docs release-check +release: frontend generate release-windows release-linux release-darwin release-freebsd release-copy release-compress vendor release-sources release-docs release-check $(DIST_DIRS): mkdir -p $(DIST_DIRS) @@ -780,6 +780,13 @@ ifeq ($(CI),true) cp /build/* $(DIST)/binaries endif +.PHONY: release-freebsd +release-freebsd: | $(DIST_DIRS) + CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'freebsd/amd64' -out gitea-$(VERSION) . +ifeq ($(CI),true) + cp /build/* $(DIST)/binaries +endif + .PHONY: release-copy release-copy: | $(DIST_DIRS) cd $(DIST); for file in `find . -type f -name "*"`; do cp $${file} ./release/; done; |