Merge pull request #3 from ShadySquirrel/master

Update Makefile to better support packages that utilise make install / make uninstall
This commit is contained in:
abraunegg 2018-05-25 00:09:14 +10:00 committed by GitHub
commit bc815541b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,7 @@ 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 -rf ~/.config/onedrive
rm -f $(DESTDIR)/etc/logrotate.d/onedrive
version: .git/HEAD .git/index
echo $(shell git describe --tags) >version
echo $(shell git describe --tags) >version