-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
42 lines (29 loc) · 1.06 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
DIST ?= fc37
VERSION := $(shell cat version)
REL := $(shell cat rel)
SRC_FILE := fwupd-$(VERSION).tar.xz
BUILDER_DIR ?= ../..
SRC_DIR ?= qubes-src
DISTFILES_MIRROR ?= https://github.com/fwupd/fwupd/releases/download/$(VERSION)/fwupd-$(VERSION).tar.xz
UNTRUSTED_SUFF := .UNTRUSTED
ifeq ($(FETCH_CMD),)
$(error "You can not run this Makefile without having FETCH_CMD defined")
endif
SHELL := /bin/bash
keyring := fwupd-trustedkeys.gpg
keyring-file := $(if $(GNUPGHOME), $(GNUPGHOME)/, $(HOME)/.gnupg/)$(keyring)
keyring-import := gpg -q --no-auto-check-trustdb --no-default-keyring --import
$(keyring-file): hughsie.pub
@rm -f $(keyring-file) && $(keyring-import) --keyring $(keyring) $^
$(SRC_FILE).asc:
$(FETCH_CMD) $@ $(DISTFILES_MIRROR).asc
%: %.asc $(keyring-file)
@$(FETCH_CMD) $@$(UNTRUSTED_SUFF) $(DISTFILES_MIRROR)
@gpgv --keyring $(keyring) $< $@$(UNTRUSTED_SUFF) 2>/dev/null || \
{ echo "Wrong signature on $@$(UNTRUSTED_SUFF)!"; exit 1; }
@mv $@$(UNTRUSTED_SUFF) $@
.PHONY: get-sources
get-sources: $(SRC_FILE)
.PHONY: verify-sources
verify-sources:
@true