summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1e7c6409845fa7ebf23d3259e207b0ca38b537bb (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
# Maintainer: Hugo Denizart <hugo at denizart dot pro>
pkgname=obs-streamfx-git
pkgver=0.8.0b1.r13.g4f789a0
pkgrel=1
pkgdesc="Bring your stream back to life with modern effects!"
arch=("x86_64")
url="https://github.com/Xaymar/obs-StreamFX"
license=("GPL2")
# same dependencies as OBS Studio + ninja makedepends
depends=("ffmpeg" "jansson" "libxinerama" "libxkbcommon-x11"
         "qt5-x11extras" "curl" "gtk-update-icon-cache"
         "obs-studio>=25")
makedepends=("cmake" "git" "libfdk-aac" "libxcomposite" "x264" "jack"
             "vlc" "swig" "luajit" "python" "ninja")
provides=("obs-streamfx")
conflicts=("obs-streamfx")
source=("$pkgname::git+https://github.com/Xaymar/obs-StreamFX.git#branch=master")
md5sums=("SKIP")

pkgver() {
  cd "$pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd $pkgname
  git submodule update --init --recursive
}

build() {
  cd $pkgname

  cmake -H. -B"build/flux" -G"Ninja" -DOBS_DOWNLOAD=ON -DCMAKE_PACKAGE_NAME=StreamFX -DCMAKE_PACKAGE_PREFIX="build/package" -DCMAKE_INSTALL_PREFIX="build/distrib" -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 644 $pkgdir/usr/share/obs/obs-plugins/StreamFX/*/**/*
}

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