1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Allan McRae <allan@archlinux.org>
3 # Contributor: Jason Chu <jchu@xentac.net>
6 pkgname=(openal openal-examples)
9 pkgdesc="Cross-platform 3D audio library, software implementation"
11 url="https://github.com/kcat/openal-soft"
14 makedepends=(alsa-lib libpulse fluidsynth portaudio jack pipewire qt5-base sdl2
15 libsndfile ffmpeg libmysofa git cmake ninja)
16 optdepends=('qt5-base: alsoft-config GUI Configurator'
17 'fluidsynth: MIDI rendering'
18 'libmysofa: makemhr tool')
20 _commit=dc83d99c95a42c960150ddeee06c124134b52208 # tags/1.22.2
21 source=("git+https://github.com/kcat/openal-soft#commit=$_commit")
26 git describe --tags | sed 's/^openal-soft-//;s/[^-]*-g/r&/;s/-/+/g'
34 cmake -S openal-soft -B build -G Ninja \
35 -DCMAKE_INSTALL_PREFIX=/usr \
36 -DCMAKE_BUILD_TYPE=None \
37 -DCMAKE_INSTALL_LIBDIR=lib
42 local p="$1" f d; shift
44 d="$srcdir/$p/${f#$pkgdir/}"
45 mkdir -p "$(dirname "$d")"
47 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
52 provides+=(libopenal.so)
54 DESTDIR="$pkgdir" cmake --install build
55 install -Dt "$pkgdir/usr/share/doc/openal" -m644 openal-soft/docs/*
58 _pick examples usr/bin/al{ffplay,hrtf,latency,loopback,multireverb}
59 _pick examples usr/bin/al{play,record,reverb,stream,tonegen}
62 package_openal-examples() {
63 pkgdesc+=" (example programs)"
64 depends=("openal=$pkgver-$pkgrel" sdl2 libsndfile ffmpeg)
66 mv examples/* "$pkgdir"