21 lines
988 B
Bash
Executable File
21 lines
988 B
Bash
Executable File
#!/bin/sh
|
|
# The module must match the private PulseAudio runtime on the Mini 2.
|
|
set -eu
|
|
cd "$(dirname "$0")"
|
|
output=${1:-./build}
|
|
mkdir -p "$output"
|
|
output=$(cd "$output" && pwd)
|
|
tmp=$(mktemp -d)
|
|
trap 'rm -r "$tmp"' EXIT
|
|
mirror=https://deb.debian.org/debian/pool/main
|
|
curl -fsSL "$mirror/p/pulseaudio/pulseaudio_17.0+dfsg1-2+b1_arm64.deb" -o "$tmp/pulse.deb"
|
|
curl -fsSL "$mirror/l/ladspa-sdk/ladspa-sdk_1.17-1+b1_arm64.deb" -o "$tmp/ladspa.deb"
|
|
mkdir "$tmp/pulse" "$tmp/ladspa"
|
|
(cd "$tmp/pulse"; ar p "$tmp/pulse.deb" data.tar.xz | tar -xJf -)
|
|
(cd "$tmp/ladspa"; ar p "$tmp/ladspa.deb" data.tar.xz | tar -xJf -)
|
|
header=$(find "$tmp/ladspa" -name ladspa.h -print -quit)
|
|
module=$(find "$tmp/pulse" -name module-ladspa-sink.so -print -quit)
|
|
test -f "$header" && test -f "$module"
|
|
zig cc -target aarch64-linux-gnu.2.30 -mcpu=cortex_a53 -O3 -Wall -Wextra -Werror -shared -fPIC -I "$(dirname "$header")" filter.c -lm -o "$output/alice_room_eq.so"
|
|
cp "$module" "$output/module-ladspa-sink.so"
|