From fe72a9de4167c633820450d6286917d53e26275c Mon Sep 17 00:00:00 2001 From: NVieville Date: Sun, 28 Apr 2019 13:05:46 +0200 Subject: [PATCH 1/2] Fix DESTDIR for admin users Signed-off-by: NVieville --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 093f2f38..e56a479e 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ ifeq ($(strip $(DESTDIR)),) INSTALLBASE = $(HOME)/.local/share/gnome-shell/extensions SUDO= else - INSTALLBASE = $(DESTDIR)usr/share/gnome-shell/extensions + INSTALLBASE = $(DESTDIR)/usr/share/gnome-shell/extensions SUDO=sudo endif From d8360caf1e470336c63e02b4a61047dd8c6edee6 Mon Sep 17 00:00:00 2001 From: NVieville Date: Sun, 28 Apr 2019 16:56:39 +0200 Subject: [PATCH 2/2] Add BUILD_FOR_RPM check in order to produce RPM package Signed-off-by: NVieville --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index e56a479e..8eeee9e6 100644 --- a/Makefile +++ b/Makefile @@ -23,8 +23,12 @@ ifeq ($(strip $(DESTDIR)),) SUDO= else INSTALLBASE = $(DESTDIR)/usr/share/gnome-shell/extensions +ifeq ($(BUILD_FOR_RPM),1) + SUDO= +else SUDO=sudo endif +endif ifdef VERSION VSTRING = _v$(VERSION) @@ -96,13 +100,17 @@ install: remove build $(call msg,$@,$(SUDO) $(INSTALLBASE)/$(INSTALLNAME)) $(Q) $(SUDO) mkdir -p $(INSTALLBASE)/$(INSTALLNAME) $(Q) $(SUDO) cp $(VV) -r ./_build/* $(INSTALLBASE)/$(INSTALLNAME)/ +ifeq ($(strip $(BUILD_FOR_RPM)),) $(Q) $(MAKE) -s reload +endif $(call msg,$@,OK) remove: $(call msg,$@,$(SUDO) $(INSTALLBASE)/$(INSTALLNAME)) $(Q) $(SUDO) rm $(VV) -fr $(INSTALLBASE)/$(INSTALLNAME) +ifeq ($(strip $(BUILD_FOR_RPM)),) $(Q) $(MAKE) -s reload +endif $(call msg,$@,OK) reload: