forked from fepitre/qubes-rofi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (28 loc) · 1.12 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
DIST ?= fc33
VERSION := $(shell cat version)
REL := 1
FEDORA_SOURCES := https://src.fedoraproject.org/rpms/rofi/raw/f$(subst fc,,$(DIST))/f/sources
SRC_FILE := rofi-$(VERSION).tar.gz
BUILDER_DIR ?= ../..
SRC_DIR ?= qubes-src
DISTFILES_MIRROR ?= https://github.com/DaveDavenport/rofi/releases/download/$(VERSION)/
UNTRUSTED_SUFF := .UNTRUSTED
FETCH_CMD := wget --no-use-server-timestamps -q -O
SHELL := /bin/bash
%: %.sha512
@$(FETCH_CMD) $@$(UNTRUSTED_SUFF) $(DISTFILES_MIRROR)$@
@sha512sum --status -c <(printf "$$(cat $<) -\n") <$@$(UNTRUSTED_SUFF) || \
{ echo "Wrong SHA512 checksum on $@$(UNTRUSTED_SUFF)!"; exit 1; }
@mv $@$(UNTRUSTED_SUFF) $@
.PHONY: get-sources
get-sources: $(SRC_FILE)
.PHONY: verify-sources
verify-sources:
@true
# 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)