-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 796 Bytes
/
Makefile
File metadata and controls
28 lines (22 loc) · 796 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
# rustup target add x86_64-unknown-linux-musl
# nix-shell -p lzo pkgconfig clang docutils --run make
TGT = target/x86_64-unknown-linux-musl/release
VERSION = $(shell cargo pkgid | sed 's/.*://')
PV = fc-userscan-$(VERSION)
# create a tarball containing a static binary and the man page
release: dist/$(PV)/fc-userscan.1
cargo test
cargo build --release --target x86_64-unknown-linux-musl
mkdir -p dist/$(PV)
install -m 0755 $(TGT)/fc-userscan dist/$(PV)
cd dist && tar czf $(PV).tar.gz $(PV)
dist/$(PV)/fc-userscan.1: userscan.1.rst
mkdir -p dist/$(PV)
sed 's/@version@/$(VERSION)/' userscan.1.rst > dist/userscan.1.rst
rst2man.py dist/userscan.1.rst > dist/$(PV)/fc-userscan.1
rm dist/userscan.1.rst
clean:
rm -rf dist
cleanall: clean
cargo clean
.PHONY: release clean cleanall