17
0
Files
hamster-time-tracker/0139-Makefile-Add-install-target.patch
Martin Wilck d6015f39c7 - GNOME 40 support for hamster shell extension
Upstream: d6e45d7 ("Fix GNOME shell error message about factsBox.FactsBox")
  * added 0131-metadata.json.in-fix-json-syntax-error.patch
  * added 0132-Update-README.st.patch
  * added 0133-Bump-latest-validated-gnome-shell-version-1.patch
  * added 0134-README-mention-GNOME-shell-compatibility-of-this-ver.patch
  * added 0135-README.rst-document-GNOME-shell-compatibility.patch
  * added 0136-ongoingFactEntry-stop-using-deprecated-Clutter-key-s.patch
  * added 0137-README.rst-update-GNOME-shell-compatibility-informat.patch
  * added 0138-Makefile-Add-install-user-target.patch
  * added 0139-Makefile-Add-install-target.patch
  * added 0140-README-Add-description-of-install-targets.patch
  * added 0141-Update-reST-syntax.patch
  * added 0142-Update-reST-syntax-take-2.patch
  * added 0143-Document-GNOME-3.38-compatibility.patch
  * added 0144-panelWidget-Remove-show-method.patch
  * added 0145-panelWidget-Rename-toggle-to-toggle_menu.patch
  * added 0146-Makeing-it-work-with-Gnome-40.-340.patch
  * added 0147-fixup-Makeing-it-work-with-Gnome-40.-340.patch

OBS-URL: https://build.opensuse.org/package/show/Office/hamster-time-tracker?expand=0&rev=23
2021-05-20 21:42:39 +00:00

48 lines
1.5 KiB
Diff

From 0d9b54a7e443cfec177454cd82002e417538263c Mon Sep 17 00:00:00 2001
From: Andrew Jeffery <andrew@aj.id.au>
Date: Tue, 5 May 2020 10:47:43 +0930
Subject: [PATCH 139/147] Makefile: Add install target
`make install` deploys the extension to the system path rather than
confining it to per-user directories.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
Makefile | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 2fb39fa..12bb439 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,8 @@ SPHINX_TEST_SPHINX_BUILDDIR = _test_build
# Directory to collect all sourc file to in order to build.
BUILDDIR = build
+# Distination installation directory
+DESTDIR := /usr/local
# Directory to save a 'ready to deploy extension' archive
DISTDIR = dist
# Extension "UUID" to use, default: contact@projecthamster.org
@@ -103,8 +105,12 @@ test-docs:
test-style:
jshint --config .jshint.cfg extension/
-.PHONY: install-user
-install-user: dist
- rm -rf ${HOME}/.local/share/gnome-shell/extensions/$(UUID)
- mkdir -p ${HOME}/.local/share/gnome-shell/extensions/$(UUID)
- tar xfz dist/$(UUID).tar.gz -C ${HOME}/.local/share/gnome-shell/extensions/$(UUID)
+.PHONY: install install-user
+install-user: DESTDIR="${HOME}/.local"
+install-user: install
+
+install: dist
+ [ -n "$(DESTDIR)" ]
+ rm -rf $(DESTDIR)/share/gnome-shell/extensions/$(UUID)
+ mkdir -p $(DESTDIR)/share/gnome-shell/extensions/$(UUID)
+ tar xfz dist/$(UUID).tar.gz -C $(DESTDIR)/share/gnome-shell/extensions/$(UUID)
--
2.31.1