forked from tailhook/vagga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (51 loc) · 1.68 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
RUSTC ?= rustc
CC ?= gcc
AR ?= ar
export PREFIX ?= /usr
export DESTDIR ?=
export VAGGA_VERSION = $(shell git describe)
PACKAGE_FILES = vagga apk busybox alpine-keys.apk install.sh
COMPLETION_FILES = completions/bash-completion.sh completions/zsh-completion.sh
all: downloads vagga
with-docker: downloads
cargo build --no-default-features --features docker_runner
release: downloads vagga-release
build-test: downloads vagga-build-test
vagga:
cargo build --target=x86_64-unknown-linux-musl
cp --remove-destination target/x86_64-unknown-linux-musl/debug/vagga .
vagga-release:
cargo build --target=x86_64-unknown-linux-musl --release
cp --remove-destination target/x86_64-unknown-linux-musl/release/vagga .
vagga-build-test:
cargo build --target=x86_64-unknown-linux-musl --profile=test
cp --remove-destination target/x86_64-unknown-linux-musl/debug/vagga .
downloads: apk busybox alpine-keys.apk
alpine/MIRRORS.txt apk busybox alpine-keys: ./fetch_binaries.sh
./fetch_binaries.sh
install:
./install.sh
tarball:
[ -d dist ] || mkdir dist
tarname=vagga-$$(git describe | cut -c2-).tar.xz \
&& tmpdir=$$(mktemp -d) \
&& mkdir -p $$tmpdir/vagga/completions \
&& cp $(PACKAGE_FILES) $$tmpdir/vagga \
&& cp $(COMPLETION_FILES) $$tmpdir/vagga/completions \
&& tar -cJf dist/$$tarname -C $$tmpdir vagga \
&& rm -rf $$tmpdir \
echo Done tarball $$tarname
ubuntu-package:
checkinstall \
--default \
--maintainer=paul@colomiets.name \
--pkglicense=MIT \
--pkgname=vagga \
--pkgver="$$(git describe | cut -c2-)" \
--pakdir="dist" \
--requires="uidmap" \
--backup=no \
--nodoc \
$(CHECKINSTALL_FLAGS) \
./install.sh
.PHONY: all downloads vagga install release vagga-release