-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
36 lines (29 loc) · 1.11 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
34
35
36
.PHONY: clean default install outdated print test
default: target/release/hwtop target/release/sensord
clean:
rm -rf Cargo.lock target/
target/release/hwtop target/release/sensord &:
cargo build --release -p hwtop -p sensord
install: target/release/hwtop target/release/sensord
cp -f target/release/hwtop target/release/sensord /usr/bin/
if [ -d '/etc/systemd/system/' ]; then \
cp -f sensord/data/systemd/sensord.service /etc/systemd/system/; \
mkdir -p /etc/sysusers.d/; \
cp -f sensord/data/systemd/sensord.sysusers /etc/sysusers.d/system-user-sensord.conf; \
systemctl daemon-reload; \
elif [ -d '/etc/init.d/' ]; then \
cp -f sensord/data/openrc/sensord.init /etc/init.d/sensord; \
if ! /usr/bin/getent passwd sensord >/dev/null; then \
/usr/sbin/useradd --system --comment 'dev.arnavion.sensord' --shell /sbin/nologin --no-create-home sensord; \
fi; \
fi
mkdir -p /etc/dbus-1/system.d/
cp -f sensord/data/sensord.dbus /etc/dbus-1/system.d/sensord.conf
outdated:
cargo-outdated
print:
git status --porcelain
test:
cargo test --workspace
cargo clippy --workspace --tests --examples
cargo machete