-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (23 loc) · 941 Bytes
/
Makefile
File metadata and controls
28 lines (23 loc) · 941 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
PREFIX ?= $(HOME)/.local
SYSTEMD_DIR ?= $(HOME)/.config/systemd/user
APPS_DIR ?= $(HOME)/.local/share/applications
build:
cargo build --release
install: build
install -Dm755 target/release/patchwire $(PREFIX)/bin/patchwire
install -Dm755 target/release/patchwire-gtk $(PREFIX)/bin/patchwire-gtk
install -Dm644 data/patchwire.service $(SYSTEMD_DIR)/patchwire.service
sed -i "s|/usr/bin|$(PREFIX)/bin|" $(SYSTEMD_DIR)/patchwire.service
install -Dm644 data/patchwire.desktop $(APPS_DIR)/patchwire.desktop
systemctl --user daemon-reload
systemctl --user enable patchwire.service --now
@echo ""
@echo "Installed successfully, launch Patchwire from your app menu."
uninstall:
systemctl --user disable --now patchwire || true
rm -f $(PREFIX)/bin/patchwire
rm -f $(PREFIX)/bin/patchwire-gtk
rm -f $(SYSTEMD_DIR)/patchwire.service
rm -f $(APPS_DIR)/patchwire.desktop
systemctl --user daemon-reload
.PHONY: build install uninstall