summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e307e47fc8fc152ee8664dd77bc47ac1344476e1 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Maintainer: Frederik “Freso” S. Olesen <archlinux at freso.dk>
# Contributor: Hugo Denizart <hugo at denizart dot pro>
_pkgname=obs-StreamFX
pkgname=${_pkgname,,}-unstable
pkgver=0.12.0b299
pkgrel=3
pkgdesc="Bring your stream back to life with modern effects! (unstable/testing version)"
arch=("x86_64")
url="https://github.com/Xaymar/$_pkgname"
license=("GPL2")
# same dependencies as OBS Studio + nlohmann-json + ninja makedepends
depends=("ffmpeg" "jansson" "libxinerama" "libxkbcommon-x11"
         "qt6-base" "curl" "gtk-update-icon-cache"
         "obs-studio>=29" "nlohmann-json")
makedepends=("cmake" "git" "libfdk-aac" "libxcomposite" "x264" "jack"
             "vlc" "swig" "luajit" "python" "ninja")
provides=(${_pkgname,,})
conflicts=(${_pkgname,,})
source=("$_pkgname::git+$url.git#tag="$pkgver
        'Xaymar-cmake-clang::git+https://github.com/Xaymar/cmake-clang.git'
        'Xaymar-cmake-version::git+https://github.com/Xaymar/cmake-version.git'
        'Xaymar-msvc-redist-helper::git+https://github.com/Xaymar/msvc-redist-helper.git'
        'git+https://github.com/NVIDIA/MAXINE-AR-SDK.git'
        'git+https://github.com/NVIDIA/MAXINE-VFX-SDK.git'
        'git+https://github.com/obsproject/obs-studio.git')
md5sums=('SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP')

prepare() {
  cd $_pkgname

  # Use packaged copy of nlohmann-json header
  git rm third-party/nlohmann-json
  mkdir -p third-party/nlohmann-json
  ln -s /usr/include/nlohmann third-party/nlohmann-json/single_include

  # Use local clones of submodules
  git submodule init
  git config submodule.cmake/clang.url "$srcdir/Xaymar-cmake-clang"
  git config submodule.cmake/version.url "$srcdir/Xaymar-cmake-version"
  git config submodule.third-party/msvc-redist-helper.url "$srcdir/Xaymar-msvc-redist-helper"
  git config submodule.third-party/nvidia-maxine-ar-sdk.url "$srcdir/MAXINE-AR-SDK"
  git config submodule.third-party/nvidia-maxine-vfx-sdk.url "$srcdir/MAXINE-VFX-SDK"
  git config submodule.third-party/obs-studio.url "$srcdir/obs-studio"

  git -c protocol.file.allow=always submodule update
}

build() {
  cd $_pkgname

  cmake -H. -B"build/flux" -G"Ninja" -DCMAKE_INSTALL_PREFIX="build/distrib" -DENABLE_UPDATER=FALSE -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc

  cmake --build "build/flux" --config RelWithDebInfo --target install
}

package() {
  cd $_pkgname/build/distrib/plugins/StreamFX

  install -D -m 755 bin/64bit/StreamFX.so $pkgdir/usr/lib/obs-plugins/StreamFX.so

  mkdir -p $pkgdir/usr/share/obs/obs-plugins/StreamFX
  cp -R data/* $pkgdir/usr/share/obs/obs-plugins/StreamFX
  chmod u=rwX,g=rX,o=rX $pkgdir/usr/share/obs/obs-plugins/StreamFX/*/**/*
}

# vim: ts=2:sw=2:expandtab