]> git.zerfleddert.de Git - m1-debian/blob - speakersafetyd.sh
Line in the wrong section spotted by Jostein Kjønigsen
[m1-debian] / speakersafetyd.sh
1 #!/usr/bin/env bash
2
3 # SPDX-License-Identifier: MIT
4
5 set -o errexit
6 set -o nounset
7 set -o pipefail
8 set -o xtrace
9
10 cd "$(dirname "$0")"
11
12 export CARGO_HOME="$(pwd)/build/cargo"
13 export RUSTUP_HOME="$(pwd)/build/rust"
14 source "$(pwd)/build/cargo/env"
15
16 unset LC_CTYPE
17 unset LANG
18
19 cd build
20
21 test -d speakersafetyd/ || git clone https://github.com/AsahiLinux/speakersafetyd
22 cd speakersafetyd/
23 git fetch -a -t
24 git reset --hard origin/HEAD
25
26 cat <<'EOF' >> Cargo.toml
27 [package.metadata.deb]
28 maintainer = "Thomas Glanzmann <thomas@glanzmann.de>"
29 copyright = "The Asahi Linux Contributors"
30 license-file = ["LICENSE", "0"]
31 depends = "$auto"
32 assets = [
33 ["LICENSE", "/var/lib/speakersafetyd/blackbox/", "644"],
34 ["target/release/speakersafetyd", "/usr/bin/speakersafetyd", "755"],
35 ["95-speakersafetyd.rules", "/usr/lib/udev/rules.d/95-speakersafetyd.rules", "644"],
36 ["speakersafetyd.service", "/usr/lib/systemd/system/speakersafetyd.service", "644"],
37 ["conf/apple/*", "/usr/share/speakersafetyd/apple/", "644"],
38 ]
39 EOF
40
41 make
42 cargo install cargo-deb
43 cargo deb
Impressum, Datenschutz