]> cvs.zerfleddert.de Git - m1-debian/blame - speakersafetyd.sh
Feedback from Sebastian
[m1-debian] / speakersafetyd.sh
CommitLineData
31b39e6a
TG
1#!/usr/bin/env bash
2
3# SPDX-License-Identifier: MIT
4
5set -o errexit
6set -o nounset
7set -o pipefail
8set -o xtrace
9
10cd "$(dirname "$0")"
11
12export CARGO_HOME="$(pwd)/build/cargo"
13export RUSTUP_HOME="$(pwd)/build/rust"
14source "$(pwd)/build/cargo/env"
15
16unset LC_CTYPE
17unset LANG
18
19cd build
20
21test -d speakersafetyd/ || git clone https://github.com/AsahiLinux/speakersafetyd
22cd speakersafetyd/
23git fetch -a -t
24git reset --hard origin/HEAD
25
26cat <<'EOF' >> Cargo.toml
27[package.metadata.deb]
28maintainer = "Thomas Glanzmann <thomas@glanzmann.de>"
29copyright = "The Asahi Linux Contributors"
30license-file = ["LICENSE", "0"]
31depends = "$auto"
32assets = [
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]
39EOF
40
41make
42cargo install cargo-deb
43cargo deb
Impressum, Datenschutz