File 0104-Makefile-allow-shipping-convenience.js.patch of Package hamster-time-tracker

From 3e7549901148c5b4687cad21595041bb8d9e5dd3 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Fri, 1 Mar 2019 14:50:03 +0100
Subject: [PATCH 104/130] Makefile: allow shipping convenience.js

This is for build environments that are offline and can't
fetch convenience.js from the net.
---
 Makefile | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index b1a6a7a..8892a93 100644
--- a/Makefile
+++ b/Makefile
@@ -52,11 +52,15 @@ clean-docs:
 clean-test-docs:
 	$(MAKE) -C docs clean SPHINX_BUILDDIR=$(SPHINX_TEST_SPHINX_BUILDDIR)
 
-collect:
-	mkdir -p $(BUILDDIR)
+$(BUILDDIR):
+	mkdir -p $@
+
+$(BUILDDIR)/convenience.js:	$(BUILDDIR)
+	wget https://gitlab.gnome.org/GNOME/gnome-shell-extensions/raw/gnome-3-30/lib/convenience.js -O $@
+
+collect:	$(BUILDDIR)/convenience.js
 	cp -R extension/* $(BUILDDIR)
 	cp -R data/* $(BUILDDIR)
-	wget https://gitlab.gnome.org/GNOME/gnome-shell-extensions/raw/gnome-3-30/lib/convenience.js -O $(BUILDDIR)/convenience.js
 
 compile: collect
 	glib-compile-schemas $(BUILDDIR)/schemas
@@ -71,7 +75,7 @@ develop:
 	pip install -U pip setuptools wheel
 	pip install -U -r requirements.pip
 
-dist: clean-build compile
+dist: compile
 # We need to do this like this as 'zip' always uses the cwd as archive root.
 # And for the extension to work extension.js etc. need to be at the root.
 	mkdir -p $(DISTDIR);
-- 
2.26.1

openSUSE Build Service is sponsored by