-
Notifications
You must be signed in to change notification settings - Fork 1
/
speakersafetyd.sh
43 lines (34 loc) · 1.06 KB
/
speakersafetyd.sh
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
37
38
39
40
41
42
43
#!/usr/bin/env bash
# SPDX-License-Identifier: MIT
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace
cd "$(dirname "$0")"
export CARGO_HOME="$(pwd)/build/cargo"
export RUSTUP_HOME="$(pwd)/build/rust"
source "$(pwd)/build/cargo/env"
unset LC_CTYPE
unset LANG
cd build
test -d speakersafetyd/ || git clone https://github.com/AsahiLinux/speakersafetyd
cd speakersafetyd/
git fetch -a -t
git reset --hard origin/HEAD
cat <<'EOF' >> Cargo.toml
[package.metadata.deb]
maintainer = "Thomas Glanzmann <[email protected]>"
copyright = "The Asahi Linux Contributors"
license-file = ["LICENSE", "0"]
depends = "$auto"
assets = [
["LICENSE", "/var/lib/speakersafetyd/blackbox/", "644"],
["target/release/speakersafetyd", "/usr/bin/speakersafetyd", "755"],
["95-speakersafetyd.rules", "/usr/lib/udev/rules.d/95-speakersafetyd.rules", "644"],
["speakersafetyd.service", "/usr/lib/systemd/system/speakersafetyd.service", "644"],
["conf/apple/*", "/usr/share/speakersafetyd/apple/", "644"],
]
EOF
make
cargo install cargo-deb
cargo deb