]> cvs.zerfleddert.de Git - m1-debian/commitdiff
add build script for speakersafeteyd
authorThomas Glanzmann <thomas@glanzmann.de>
Sun, 12 Nov 2023 10:28:15 +0000 (11:28 +0100)
committerThomas Glanzmann <thomas@glanzmann.de>
Sun, 12 Nov 2023 10:28:15 +0000 (11:28 +0100)
meta.sh
prepare_rust.sh
speakersafetyd.sh [new file with mode: 0644]

diff --git a/meta.sh b/meta.sh
index 376d4e561afb22463b91e82435408f53f91d6c75..999f97ba4e4aacf69d85bba9804705010a8f513f 100644 (file)
--- a/meta.sh
+++ b/meta.sh
@@ -12,14 +12,14 @@ unset LANG
 
 mkdir -p build
 cd build
-export META_VERSION=6.5.0-1
+export META_VERSION=6.5.0-2
 rm -rf linux-image-asahi_${META_VERSION}_arm64
 mkdir -p linux-image-asahi_${META_VERSION}_arm64/DEBIAN
 cat > linux-image-asahi_${META_VERSION}_arm64/DEBIAN/control <<EOF
 Package: linux-image-asahi
 Version: $META_VERSION
 Section: base
-Depends: linux-image-6.5.0-asahi-00671-g618f14cf48b9
+Depends: linux-image-6.5.0-asahi-00780-g62806c2c6f29
 Provides: wireguard-modules (= 1.0.0)
 Priority: optional
 Architecture: arm64
index 8e66744dbb944488af511c3bb4419c94ffdf1e2b..31d85ddbfbfe8aa3812447d36081274f642cadcc 100644 (file)
@@ -17,6 +17,7 @@ rm -rf ${CARGO_HOME} ${RUSTUP_HOME}
 curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --default-toolchain none
 source "$(pwd)/build/cargo/env"
 rustup override set 1.70.0
+rustup default 1.70.0
 rustup component add rust-src
 cargo install --locked --version 0.62.0 bindgen-cli
 rustup component add rustfmt
diff --git a/speakersafetyd.sh b/speakersafetyd.sh
new file mode 100644 (file)
index 0000000..f59f82e
--- /dev/null
@@ -0,0 +1,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 <thomas@glanzmann.de>"
+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
Impressum, Datenschutz