-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 970 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (29 loc) · 970 Bytes
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
32
33
34
35
36
# codework/Python/xrandrw/Makefile
PREFIX ?= $(HOME)/.local
BIN ?= $(PREFIX)/bin
SYSD ?= $(HOME)/.config/systemd/user
CONF ?= $(HOME)/.config
TARGET := xrandrw
UNIT := systemd/xrandrw.service
CONF_SAMPLE := xrandrw.conf.sample
.PHONY: all install uninstall enable disable
all:
@echo "Targets: install, uninstall, enable, disable"
install:
pipx install --force .
install -Dm644 $(CONF_SAMPLE) $(CONF)/xrandrw.conf.sample
install -Dm644 $(UNIT) $(SYSD)/xrandrw.service
@echo "Run: systemctl --user daemon-reload"
uninstall:
- systemctl --user stop xrandrw.service || true
- systemctl --user disable xrandrw.service || true
- rm -f $(SYSD)/xrandrw.service
- rm -f $(BIN)/$(TARGET)
- rm -f $(CONF)/xrandrw.conf.sample
@echo "Run: systemctl --user daemon-reload"
enable:
systemctl --user daemon-reload
systemctl --user enable --now xrandrw.service
disable:
systemctl --user disable --now xrandrw.service || true
systemctl --user daemon-reload