-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
33 lines (27 loc) · 1.27 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
32
33
# SPDX-Licence-Identifier: MIT
# Copyright The Asahi Linux Contributors
BINDIR ?= /usr/bin
UNITDIR ?= /lib/systemd/system
UDEVDIR ?= /lib/udev/rules.d
TMPFILESDIR ?= /usr/lib/tmpfiles.d
SHAREDIR ?= /usr/share/
VARDIR ?= /var/
all:
cargo build --release
install: install-data
install -dDm0755 $(DESTDIR)/$(BINDIR)
install -pm0755 target/release/speakersafetyd $(DESTDIR)/$(BINDIR)/speakersafetyd
install-data:
install -dDm0755 $(DESTDIR)/$(UNITDIR)
install -pm0644 speakersafetyd.service $(DESTDIR)/$(UNITDIR)/speakersafetyd.service
install -dDm0755 $(DESTDIR)/$(UDEVDIR)
install -pm0644 95-speakersafetyd.rules $(DESTDIR)/$(UDEVDIR)/95-speakersafetyd.rules
install -dDm0755 $(DESTDIR)/$(SHAREDIR)/speakersafetyd/apple
install -pm0644 -t $(DESTDIR)/$(SHAREDIR)/speakersafetyd/apple $(wildcard conf/apple/*)
install -dDm0755 $(DESTDIR)/$(VARDIR)/lib/speakersafetyd/blackbox
install -dDm0755 $(DESTDIR)/$(TMPFILESDIR)
install -pm0644 speakersafetyd.tmpfiles $(DESTDIR)/$(TMPFILESDIR)/speakersafetyd.conf
uninstall:
rm -f $(DESTDIR)/$(BINDIR)/speakersafetyd $(DESTDIR)/$(UNITDIR)/speakersafetyd.service $(DESTDIR)/$(UDEVDIR)/95-speakersafetyd.rules $(DESTDIR)/$(TMPFILESDIR)/speakersafetyd.conf
rm -rf $(DESTDIR)/$(SHAREDIR)/speakersafetyd
.PHONY: all install install-data uninstall