summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 295812f..04b2a30 100644
--- a/Makefile
+++ b/Makefile
@@ -2,20 +2,31 @@ PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin
DATADIR?=$(PREFIX)/share
MANDIR?=$(DATADIR)/man/man1
+LIBDIR?=$(PREFIX)/lib
+SYSDDIR?=$(LIBDIR)/systemd/system
+USERSDIR?=$(LIBDIR)/sysusers.d
all: mirror
clean:
rm -f mirror
-install:
+install: all
mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(MANDIR)
+ mkdir -p $(DESTDIR)$(SYSDDIR)
+ mkdir -p $(DESTDIR)$(USERSDIR)
cp -f mirror $(DESTDIR)$(BINDIR)/mirror
cp -f mirror.1 $(DESTDIR)$(MANDIR)/mirror.1
+ cp -f mirror.timer $(DESTDIR)$(SYSDDIR)/mirror.timer
+ cp -f mirror.service $(DESTDIR)$(SYSDDIR)/mirror.service
+ cp -f mirror.conf $(DESTDIR)$(USERSDIR)/mirror.conf
uninstall:
rm -f $(DESTDIR)$(BINDIR)/mirror
rm -f $(DESTDIR)$(MANDIR)/mirror.1
+ rm -f $(DESTDIR)$(SYSDDIR)/mirror.timer
+ rm -f $(DESTDIR)$(SYSDDIR)/mirror.service
+ rm -f $(DESTDIR)$(USERSDIR)/mirror.conf
.PHONY: all clean install uninstall