From c9caaada9b88b0a62d0ddc771451321eb9704012 Mon Sep 17 00:00:00 2001 From: Shady Squirrel Date: Wed, 23 May 2018 21:31:20 +0200 Subject: [PATCH 1/2] Add missing DESTDIR variables Without it, building of distribution package fails. --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8673566c..8160fd40 100644 --- a/Makefile +++ b/Makefile @@ -22,11 +22,11 @@ clean: rm -f onedrive onedrive.o onedrive.service install: all - mkdir -p /var/log/onedrive - chown root.users /var/log/onedrive - chmod 0775 /var/log/onedrive + mkdir -p $(DESTDIR)/var/log/onedrive + chown root.users $(DESTDIR)/var/log/onedrive + chmod 0775 $(DESTDIR)/var/log/onedrive install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive - install -D -m 644 logrotate/onedrive.logrotate /etc/logrotate.d/onedrive + install -D -m 644 logrotate/onedrive.logrotate $(DESTDIR)/etc/logrotate.d/onedrive cp -af *.service $(DESTDIR)/usr/lib/systemd/user/ chmod 0644 $(DESTDIR)/usr/lib/systemd/user/onedrive*.service @@ -41,8 +41,8 @@ uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/onedrive rm -f $(DESTDIR)/usr/lib/systemd/user/onedrive.service rm -f $(DESTDIR)/usr/lib/systemd/user/onedrive@.service - rm -f /etc/logrotate.d/onedrive + rm -f $(DESTDIR)/etc/logrotate.d/onedrive rm -rf ~/.config/onedrive version: .git/HEAD .git/index - echo $(shell git describe --tags) >version \ No newline at end of file + echo $(shell git describe --tags) >version From 56719619f6fa737831572eb47cc0706400738393 Mon Sep 17 00:00:00 2001 From: Shady Squirrel Date: Wed, 23 May 2018 21:33:22 +0200 Subject: [PATCH 2/2] Don't remove user configuration with uninstall `make uninstall` is called by root user, which shouldn't be a primary user anyway,, so removing ~/.config/onedrive will not work for other, normal users. --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 8160fd40..1628c36f 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,6 @@ uninstall: rm -f $(DESTDIR)/usr/lib/systemd/user/onedrive.service rm -f $(DESTDIR)/usr/lib/systemd/user/onedrive@.service rm -f $(DESTDIR)/etc/logrotate.d/onedrive - rm -rf ~/.config/onedrive version: .git/HEAD .git/index echo $(shell git describe --tags) >version