Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/13'
Browse files Browse the repository at this point in the history
* origin/pr/13:
  Clean up Makefile
  Switch from wget to curl
  • Loading branch information
marmarek committed May 24, 2021
2 parents c0a705d + 1a1f2fb commit 75b65d1
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
DIST ?= fc32
VERSION := $(shell cat version)
DIST ?= fc33
VERSION := $(file <version)
XFCE_VERSION := $(word 1,$(subst ., ,$(VERSION))).$(word 2,$(subst ., ,$(VERSION)))
REL := $(shell cat rel)
REL := $(file <rel)

FEDORA_SOURCES := https://src.fedoraproject.org/rpms/xfwm4/raw/f$(subst fc,,$(DIST))/f/sources
SRC_FILE := xfwm4-$(VERSION).tar.bz2

BUILDER_DIR ?= ../..
SRC_DIR ?= qubes-src

DISTFILES_MIRROR ?= http://archive.xfce.org/src/xfce/xfwm4/$(XFCE_VERSION)/
DISTFILES_MIRROR ?= https://archive.xfce.org/src/xfce/xfwm4/$(XFCE_VERSION)/
UNTRUSTED_SUFF := .UNTRUSTED
FETCH_CMD := wget --no-use-server-timestamps -q -O

fetch = $(or $(FETCH_CMD),$(error You can not run this Makefile without having FETCH_CMD defined))

SHELL := /bin/bash

%: %.sha512
@$(FETCH_CMD) $@$(UNTRUSTED_SUFF) $(DISTFILES_MIRROR)$@
@sha512sum --status -c <(printf "$$(cat $<) -\n") <$@$(UNTRUSTED_SUFF) || \
@$(fetch) $@$(UNTRUSTED_SUFF) $(DISTFILES_MIRROR)$@
@sha512sum --status -c <(printf "$(file <$<) -\n") <$@$(UNTRUSTED_SUFF) || \
{ echo "Wrong SHA512 checksum on $@$(UNTRUSTED_SUFF)!"; exit 1; }
@mv $@$(UNTRUSTED_SUFF) $@

Expand All @@ -33,6 +34,10 @@ clean:
rm -rf debian/changelog.*
rm -rf pkgs

.PHONY: clean-sources
clean-sources:
@rm -f $(SRC_FILE)

# 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
Expand Down

0 comments on commit 75b65d1

Please sign in to comment.