summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7bb3c65a21e4b0d9a41d2f585846c508f03422b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: Rafał Kozdrój <kozeid2@gmail.com>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Jason Chu <jchu@xentac.net>

pkgbase=openal-git
pkgname=(openal-git openal-examples-git)
pkgver=1.18.1.r84.g5ec11a01
pkgrel=1
pkgdesc="Cross-platform 3D audio library, software implementation"
arch=(i686 x86_64)
url="https://github.com/kcat/openal-soft"
license=(LGPL)
depends=(glibc)
makedepends=(alsa-lib libpulse fluidsynth portaudio jack qt5-base sdl2 sdl_sound ffmpeg
             git cmake ninja)
source=("git+https://github.com/kcat/openal-soft")
md5sums=('SKIP')

pkgver() {
  cd openal-soft
  git describe --long --tags | sed 's/^openal-soft-//;s/-/.r/;s/-/./g'
}

build() {
  mkdir -p build examples
  cd build
  cmake ../openal-soft -G Ninja \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_LIBDIR=lib
  ninja
}

package_openal-git() {
  optdepends=('qt5-base: alsoft-config GUI Configurator'
              'fluidsynth: MIDI rendering')
  provides=("openal=$pkgver")
  conflicts=("openal")

  DESTDIR="$pkgdir" ninja -C build install
  install -Dt "$pkgdir/usr/share/doc/openal" -m644 openal-soft/docs/*

### Split openal-examples
  mv -v "$pkgdir"/usr/bin/al{ffplay,hrtf,latency,loopback,record,reverb,stream} examples/
}

package_openal-examples-git() {
  pkgdesc+=" (example programs)"
  depends=("openal-git=$pkgver-$pkgrel" sdl2 sdl_sound ffmpeg)
  provides=("openal-examples=$pkgver")
  conflicts=("openal-examples")

  mkdir "$pkgdir/usr"
  mv -v examples "$pkgdir/usr/bin"
}