diff options
Diffstat (limited to '0001-Makefile-Support-staged-installs-with-DESTDIR.patch')
-rw-r--r-- | 0001-Makefile-Support-staged-installs-with-DESTDIR.patch | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/0001-Makefile-Support-staged-installs-with-DESTDIR.patch b/0001-Makefile-Support-staged-installs-with-DESTDIR.patch index 4c54579be05c..cbdb66c8331e 100644 --- a/0001-Makefile-Support-staged-installs-with-DESTDIR.patch +++ b/0001-Makefile-Support-staged-installs-with-DESTDIR.patch @@ -1,7 +1,7 @@ -From e6360fe304fb49dcca4f09028a033eb14d65e887 Mon Sep 17 00:00:00 2001 -From: atomlong <atom.long@hotmail.com> -Date: Tue, 14 Sep 2021 15:07:39 +0800 -Subject: [PATCH 1/2] Makefile: Support staged installs with DESTDIR Use +From 2cc15262d098737a6c99475336b4a3861f5227f7 Mon Sep 17 00:00:00 2001 +From: atom long <atom.long@hotmail.com> +Date: Tue, 7 Mar 2023 23:22:47 +0800 +Subject: [PATCH 1/2] Makefile: Support staged installs with DESTDIR Use `DESTDIR` in install related targets to support [*staged installs*][1]. make DESTDIR=/tmp/stage install @@ -12,7 +12,7 @@ Subject: [PATCH 1/2] Makefile: Support staged installs with DESTDIR Use 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile -index 6c1dafc..79b19ed 100644 +index 810601a..932eb3c 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ @@ -29,24 +29,19 @@ index 6c1dafc..79b19ed 100644 ifneq ("$(shell grep ^staff: /etc/group)", "") GROUP = staff -@@ -11,14 +11,14 @@ else +@@ -11,9 +11,9 @@ else GROUP = root endif EXISTCRON = 0 -ifneq ("$(wildcard /run/systemd/system)", "") +ifneq ("$(wildcard /usr/lib/systemd/system)", "") SCHED = systemd - # ifneq ("$(wildcard /usr/lib/systemd/system)","") - # SYSDDIR = /lib/systemd/system - # else ifneq ("$(wildcard /lib/systemd/system)","") - # SYSDDIR = /usr/lib/systemd/system - # endif - LISTUNITS := $(shell systemctl list-unit-files --no-legend --no-page "freenom-*" 2>/dev/null|cut -d" " -f1) + LISTUNITS := $(shell ls $(SYSDDIR)/freenom-* 2>/dev/null) else ifneq ("$(shell which cron 2>/dev/null)", "") EXISTCRON = 1 SCHED = cron -@@ -50,12 +50,14 @@ ifeq ("$(wildcard $(SCRIPT))","") +@@ -45,12 +45,14 @@ ifeq ("$(wildcard $(SCRIPT))","") $(error ERROR: Installation File "$(SCRIPT)" not found) endif ifeq ("$(EXISTCONF)", "0") @@ -61,7 +56,7 @@ index 6c1dafc..79b19ed 100644 $(shell install -C -m 755 -o root -g $(GROUP) $(SCRIPT) $(INSTDIR)) else $(info File "$(INSTDIR)/$(SCRIPT)" already exists) -@@ -68,7 +70,8 @@ ifeq ("$(SCHED)", "systemd") +@@ -63,7 +65,8 @@ ifeq ("$(SCHED)", "systemd") ifneq ("$(LISTUNITS)", "") $(info Systemd unit files already installed) else @@ -71,7 +66,7 @@ index 6c1dafc..79b19ed 100644 $(shell systemctl daemon-reload) ifeq ("$(wildcard $(SYSDDIR)/freenom-*)","") $(info To schedule domain renewals and updates, use these commands:) -@@ -82,7 +85,7 @@ else ifeq ("$(SCHED)", "cron") +@@ -77,7 +80,7 @@ else ifeq ("$(SCHED)", "cron") ifeq ("$(wildcard cron.d/freenom)","") $(error ERROR: Installation path "cron.d/freenom/*" not found) else @@ -81,5 +76,5 @@ index 6c1dafc..79b19ed 100644 $(info $() $() * replace example.tk with your domain and uncomment line(s)) $(info See README.md for details) -- -2.33.0.windows.2 +2.39.2 |