summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6ee071be8b1d6f18ac3a8ab655ff8df92c12f277 (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
# Maintainer: kholo <kholo@bit-ronin.net>

_pluginname=waveform
pkgname=obs-plugin-waveform-git
pkgver=1.7.0
pkgrel=4
pkgdesc="Waveform is an audio spectral analysis plugin for OBS Studio. It is based on FFTW and optimized for AVX2/FMA3"
arch=("x86_64" "x86_64_v3")
url="https://github.com/phandasm/waveform/"
license=("GPL3")
groups=("obs-plugins")
depends=("obs-studio>=28.0.0" "fftw")
makedepends=("cmake")
source=("$_pluginname-$pkgver::git+https://github.com/phandasm/$_pluginname.git"
        "git+https://github.com/google/cpu_features.git")
md5sums=("SKIP" "SKIP")

prepare() {
  cd "$_pluginname-$pkgver"
  git submodule init
  git config submodule.deps/cpu_features.url "$srcdir/cpu_features"
  git -c protocol.file.allow=always submodule update
}

build() {
  cd "$_pluginname-$pkgver"
  cmake -B build
  make -C build
}

package() {
  install -Dm755 "$srcdir/$_pluginname-$pkgver/build/waveform.so" "$pkgdir/usr/lib/obs-plugins/libwaveform.so"
  install -Dm644 "$srcdir/$_pluginname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$_pluginname/LICENSE"
  mkdir -p "$pkgdir/usr/share/obs/obs-plugins/waveform"
  cp -r "$_pluginname-$pkgver/data/locale" "$pkgdir/usr/share/obs/obs-plugins/waveform/locale"
  cp "$_pluginname-$pkgver/data/gradient.effect" "$pkgdir/usr/share/obs/obs-plugins/waveform/gradient.effect"
}