vaultwarden/Makefile

32 lines
749 B
Makefile
Raw Normal View History

# renovate: datasource=github-releases depName=dani-garcia/vaultwarden
export BUILD_VERSION ?= 1.25.2
2020-02-22 16:04:30 +00:00
export DEBIAN_FRONTEND ?= noninteractive
export LANG ?= C.UTF-8
export TZ ?= UTC
export RUSTFLAGS ?= -C link-arg=-s
2021-10-08 10:21:14 +00:00
DB ?= sqlite,postgresql
2020-02-22 15:58:35 +00:00
SRC := src
.PHONY: all
all: build
.PHONY: build
build: build-src build-bin
.PHONY: build-src
build-src:
mkdir -p $(SRC); \
curl -sSL "https://github.com/dani-garcia/vaultwarden/archive/$${BUILD_VERSION##v}.tar.gz" | tar xz -C $(SRC) --strip-components=1
2020-02-22 15:58:35 +00:00
.PHONY: build-bin
build-bin:
2020-06-04 12:58:04 +00:00
rustup set profile minimal && \
2020-02-22 15:58:35 +00:00
cd $(SRC) && \
2020-06-04 12:58:04 +00:00
rustup target add x86_64-unknown-linux-musl && \
BWRS_VERSION="$${BUILD_VERSION##v}" cargo build -j 8 --features $(DB) --release
2020-02-22 15:58:35 +00:00
.PHONY: clean
clean:
rm -rf $(SRC)