aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/makefile b/makefile
index 6e0ca1a..cce32c2 100644
--- a/makefile
+++ b/makefile
@@ -1,7 +1,6 @@
PREFIX=/usr/local
SBINDIR=$(PREFIX)/sbin
-SYSDDIR=$(PREFIX)/lib/systemd/system
SED_SHELL:=
SED_SHELL+=s:^SBINDIR=.*:SBINDIR=$(SBINDIR):;
@@ -20,6 +19,9 @@ all:
.PHONY: install
+install: DESTDIR=$(PREFIX)
+install: SBINDIR=$(DESTDIR)/sbin
+install: SYSDDIR=$(DESTDIR)/lib/systemd/system
install:
install -d '$(SBINDIR)'
install -m 755 -t '$(SBINDIR)' adu-download
@@ -36,6 +38,9 @@ install:
.PHONY: uninstall
+uninstall: DESTDIR=$(PREFIX)
+uninstall: SBINDIR=$(DESTDIR)/sbin
+uninstall: SYSDDIR=$(DESTDIR)/lib/systemd/system
uninstall:
systemctl --now disable adu-download.timer
rm -f '$(SYSDDIR)/system-update.target.wants/adu-upgrade.service'