-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
39 lines (34 loc) · 940 Bytes
/
justfile
File metadata and controls
39 lines (34 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
BINARY := "ppmenu"
TARGET_GLIBC := "2.17"
targets := replace(
"x86_64-unknown-linux-gnu.GLIBC \
i686-unknown-linux-gnu.GLIBC \
aarch64-unknown-linux-gnu.GLIBC \
armv7-unknown-linux-gnueabihf.GLIBC \
x86_64-unknown-linux-musl \
i686-unknown-linux-musl \
aarch64-unknown-linux-musl \
armv7-unknown-linux-musleabihf",
"GLIBC",
TARGET_GLIBC
)
deps:
cargo install --locked cargo-zigbuild
for target in {{targets}}; do \
rustup target add "${target%.{{TARGET_GLIBC}}}"; \
done
release:
for target in {{targets}}; do \
cargo zigbuild --release --target "$target"; \
done
dist: release
mkdir -p dist
for target in {{targets}}; do \
target="${target%.{{TARGET_GLIBC}}}"; \
outfile="dist/{{BINARY}}-$target"; \
cp target/"$target"/release/{{BINARY}} "$outfile"; \
xz "$outfile"; \
done
clean:
rm -rf dist
cargo clean