$NetBSD: patch-Makefile,v 1.4 2022/11/10 21:12:54 khorben Exp $ Exclude LDFLAGS, this is not C. Use find(1) in a more portable way. --- Makefile.orig 2022-07-12 18:26:27.000000000 +0000 +++ Makefile @@ -95,7 +95,7 @@ else endif endif -LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)" +LDFLAGS := -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)" LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64 @@ -126,7 +126,7 @@ TAR_EXCLUDES := .git data indexers queue GO_DIRS := cmd integrations models modules routers build services tools GO_SOURCES := $(wildcard *.go) -GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go) +GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -and ! -path modules/options/bindata.go -and ! -path modules/public/bindata.go -and ! -path modules/templates/bindata.go) ifeq ($(filter $(TAGS_SPLIT),bindata),bindata) GO_SOURCES += $(BINDATA_DEST)