diff options
author | Adam Spragg <adam@spra.gg> | 2022-03-13 17:36:46 +0000 |
---|---|---|
committer | Adam Spragg <adam@spra.gg> | 2022-03-13 17:36:46 +0000 |
commit | ab3461e792a3b9a525a895bb0b3a70e55955efb6 (patch) | |
tree | d8abe25eab49ade25880946a40451f42249e5e97 /makefile |
First (mostly) working version apt-desktop-upgrades
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/makefile b/makefile new file mode 100644 index 0000000..90ed9c0 --- /dev/null +++ b/makefile @@ -0,0 +1,37 @@ + +PREFIX=/usr/local +SBINDIR=$(PREFIX)/sbin +SYSDDIR=$(PREFIX)/lib/systemd/system + +.PHONY: all +all: + @echo Build complete + + +.PHONY: install +install: all + install -d '$(SBINDIR)' + install -m 755 -t '$(SBINDIR)' adu-download + install -m 755 -t '$(SBINDIR)' adu-upgrade + install -d '$(SYSDDIR)' + install -d '$(SYSDDIR)/system-update.target.wants' + install -m 644 -t '$(SYSDDIR)' adu-download.service + install -m 644 -t '$(SYSDDIR)' adu-download.timer + install -m 644 -t '$(SYSDDIR)' adu-upgrade.service + ln -s '$(SYSDDIR)/adu-upgrade.service' '$(SYSDDIR)/system-update.target.wants/adu-upgrade.service' + systemctl daemon-reload + #systemctl --now preset adu-download.timer + systemctl --now enable adu-download.timer + + +.PHONY: uninstall +uninstall: + systemctl --now disable adu-download.timer + rm -f '$(SYSDDIR)/system-update.target.wants/adu-upgrade.service' + rm -f '$(SYSDDIR)/adu-upgrade.service' + rm -f '$(SYSDDIR)/adu-download.timer' + rm -f '$(SYSDDIR)/adu-download.service' + rm -f '$(SBINDIR)/adu-upgrade' + rm -f '$(SBINDIR)/adu-download' + systemctl daemon-reload + |