-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
51 lines (37 loc) · 1.35 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
.DEFAULT_GOAL = get-sources
.SECONDEXPANSION:
DIST ?= fc32
VERSION := $(shell cat version)
FEDORA_SOURCES := https://src.fedoraproject.org/rpms/nautilus/raw/f$(subst fc,,$(DIST))/f/sources
SRC_FILES := \
nautilus-$(VERSION).tar.xz \
BUILDER_DIR ?= ../..
SRC_DIR ?= qubes-src
SRC_URLS := \
https://download.gnome.org/sources/nautilus/43/nautilus-$(VERSION).tar.xz \
UNTRUSTED_SUFF := .UNTRUSTED
SHELL := bash
.PHONY: get-sources verify-sources clean clean-sources
ifeq ($(FETCH_CMD),)
$(error "You can not run this Makefile without having FETCH_CMD defined")
endif
%: %.sha512
@$(FETCH_CMD) $@$(UNTRUSTED_SUFF) -- $(filter %/$@,$(SRC_URLS))
@sha512sum --status -c <(printf "$$(cat $<) -\n") <$@$(UNTRUSTED_SUFF) || \
{ echo "Wrong SHA512 checksum on $@$(UNTRUSTED_SUFF)!"; exit 1; }
@mv $@$(UNTRUSTED_SUFF) $@
get-sources: $(SRC_FILES)
@true
verify-sources:
@true
clean:
@true
clean-sources:
rm -f $(SRC_FILES) *$(UNTRUSTED_SUFF)
# This target is generating content locally from upstream project
# # 'sources' file. Sanitization is done but it is encouraged to perform
# # update of component in non-sensitive environnements to prevent
# # any possible local destructions due to shell rendering
# .PHONY: update-sources
update-sources:
@$(BUILDER_DIR)/$(SRC_DIR)/builder-rpm/scripts/generate-hashes-from-sources $(FEDORA_SOURCES)