diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2021-05-18 15:57:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-18 15:57:19 +0200 |
commit | 9b651eb701f2c2423166022d8fe9b9df067fc387 (patch) | |
tree | b9a4f4493ccd0d8b733e1d04ef239475821e7f22 /Makefile | |
parent | a0620ae92c5c4790b04e404c54acaa98e89df326 (diff) | |
download | noisetorch-9b651eb701f2c2423166022d8fe9b9df067fc387.tar.gz noisetorch-9b651eb701f2c2423166022d8fe9b9df067fc387.zip |
Implement distribution-specific builds
Make more things configurable at compile time so building binaries for distributions is easier while complying with the license.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,7 +1,11 @@ +UPDATE_URL=https://noisetorch.epicgamer.org +UPDATE_PUBKEY=3mL+rBi4yBZ1wGimQ/oSQCjxELzgTh+673H4JdzQBOk= +VERSION := $(shell git describe --tags) + dev: rnnoise mkdir -p bin/ go generate - go build -o bin/noisetorch + go build -ldflags '-X main.version=${VERSION}' -o bin/noisetorch release: rnnoise mkdir -p bin/ mkdir -p tmp/ @@ -14,7 +18,7 @@ release: rnnoise mkdir -p tmp/.local/bin/ go generate - CGO_ENABLED=0 GOOS=linux go build -tags release -a -ldflags '-s -w -extldflags "-static"' . + CGO_ENABLED=0 GOOS=linux go build -tags release -a -ldflags '-s -w -extldflags "-static" -X main.version=${VERSION} -X main.distribution=official -X main.updateURL=${UPDATE_URL} -X main.publicKeyString=${UPDATE_PUBKEY}' . upx noisetorch mv noisetorch tmp/.local/bin/ cd tmp/; \ |