forked from alexhaydock/zfs-auto-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
31 lines (27 loc) · 1.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
PREFIX := /usr/local
SYSTEMD_HOME := $(PREFIX)/lib/systemd/system
all:
.PHONY: all
install: $(DESTDIR)$(SYSTEMD_HOME)
install -m 0755 -d $(DESTDIR)$(PREFIX)/sbin $(DESTDIR)$(PREFIX)/share/man/man8
install -m 0755 src/zfs-auto-snapshot.sh $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snapshot
install -m 0644 -t $(DESTDIR)$(PREFIX)/share/man/man8 src/zfs-auto-snapshot.8
install -m 0644 -t $(DESTDIR)$(SYSTEMD_HOME) \
timers/zfs-auto-snapshot-daily.service \
timers/zfs-auto-snapshot-daily.timer \
timers/zfs-auto-snapshot-frequent.service \
timers/zfs-auto-snapshot-frequent.timer \
timers/zfs-auto-snapshot-hourly.service \
timers/zfs-auto-snapshot-hourly.timer \
timers/zfs-auto-snapshot-monthly.service \
timers/zfs-auto-snapshot-monthly.timer \
timers/zfs-auto-snapshot-weekly.service \
timers/zfs-auto-snapshot-weekly.timer \
timers/zfs-auto-snapshot.target
.PHONY: install
$(DESTDIR)$(SYSTEMD_HOME):
mkdir -p $(DESTDIR)$(SYSTEMD_HOME)
.PHONY: $(DESTDIR)$(SYSTEMD_HOME)
enable: install
systemctl enable --now zfs-auto-snapshot.target
.PHONY: enable