-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (20 loc) · 737 Bytes
/
Copy pathMakefile
File metadata and controls
44 lines (20 loc) · 737 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
40
41
42
43
44
URLBASE=https://static.rust-lang.org/dist/
RUSTVER:=$(firstword $(subst -, ,$(SNAPCRAFT_PROJECT_VERSION)))
RUSTNAME=rust-$(RUSTVER)-$(ARCH)-unknown-linux-gnu
RUSTGZ = $(RUSTNAME).tar.gz
RUSTASC = $(RUSTGZ).asc
KEYRING = ./keyring.gpg
build: check
tar zxf $(RUSTGZ)
check: download $(KEYRING) force
gpg --no-default-keyring --keyring $(KEYRING) --verify $(RUSTASC) $(RUSTGZ)
download: $(RUSTASC) $(RUSTGZ)
$(RUSTASC) $(RUSTGZ):
wget $(URLBASE)$@
# Just for documentation, key should no be fetched by key-id only, that's not
# secure
#$(KEYRING):
# gpg --no-default-keyring --keyring $(KEYRING) --recv-key 5CB4A9347B3B09DC
install:
cd $(RUSTNAME) && bash install.sh --destdir=$(SNAPCRAFT_PART_INSTALL)
force: