2020-02-22 15:58:35 +00:00
|
|
|
BUILD_VERSION ?= 1.13.1
|
|
|
|
DB ?= postgresql
|
|
|
|
DEBIAN_FRONTEND ?= noninteractive
|
|
|
|
LANG ?= C.UTF-8
|
|
|
|
TZ ?= UTC
|
|
|
|
SRC := src
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: build
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build: build-src build-bin
|
|
|
|
|
|
|
|
.PHONY: build-src
|
|
|
|
build-src:
|
|
|
|
mkdir -p $(SRC); \
|
2020-02-22 16:01:51 +00:00
|
|
|
curl -sSL https://github.com/dani-garcia/bitwarden_rs/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:
|
|
|
|
rustup set profile minimal && \
|
|
|
|
cd $(SRC) && \
|
|
|
|
cargo build -j 8 --features $(DB) --release
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -rf $(SRC)
|