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
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
--- /dev/null
+#!/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