diff options
author | Sam Whited | 2018-11-10 11:36:08 -0600 |
---|---|---|
committer | Sam Whited | 2018-11-10 11:36:41 -0600 |
commit | 4b1df37b692a138c111c11505bd542d125d9bfca (patch) | |
tree | 3f583df91d022fff46e36a008bf06617db333fc2 /gitea-ldflags.patch | |
parent | 0a26f1bcb499b044efca83beab6e1e56cfb421ba (diff) | |
download | aur-4b1df37b692a138c111c11505bd542d125d9bfca.tar.gz |
Make consistent with community/gitea
Diffstat (limited to 'gitea-ldflags.patch')
-rw-r--r-- | gitea-ldflags.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gitea-ldflags.patch b/gitea-ldflags.patch new file mode 100644 index 000000000000..b9aefcda289a --- /dev/null +++ b/gitea-ldflags.patch @@ -0,0 +1,19 @@ +--- a/Makefile ++++ b/Makefile +@@ -33,6 +33,7 @@ else + GITEA_VERSION := $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//') + endif + ++EXTLDFLAGS := ${LDFLAGS} + LDFLAGS := -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)" + + PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations,$(shell $(GO) list ./... | grep -v /vendor/)) +@@ -240,7 +241,7 @@ install: $(wildcard *.go) + build: $(EXECUTABLE) + + $(EXECUTABLE): $(SOURCES) +- $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ ++ $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-linkmode external -extldflags "$(EXTLDFLAGS)" -s -w $(LDFLAGS)' -o $@ + + .PHONY: release + release: release-dirs release-windows release-linux release-darwin release-copy release-compress release-check |