summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 81dc3f31efdffdbb321b856cad68588b835e35f7 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Maintainer: Branan Riley <branan@top-secret.network>
# Contributor: Jonathan Steel <jsteel at archlinux.org>
# Contributor: Benjamin Klettbach <b.klettbach@gmail.com>
# Contributor: ArcticVanguard <LideEmily at gmail dot com>
# Contributor: ledti <antergist at gmail dot com>

pkgname=obs-studio-av1
pkgver=30.0.2
pkgrel=4
pkgdesc="Free, open source software for live streaming and recording. With AV1, Websocket, and Browser Source support."
arch=('x86_64')
url="https://obsproject.com"
license=('GPL2')
depends=(
  'curl'
  'ffmpeg'
  'gtk-update-icon-cache'
  'jack'
  'jansson'
  'libajantv2'
  'libdatachannel'
  'librist'
  'libxinerama'
  'libxkbcommon-x11'
  'mbedtls'
  'onevpl'
  'pciutils'
  'qt6-svg'
  'rnnoise'
  'speexdsp'

  # Deps of Websocket plugin
  'qrcodegencpp-cmake'
)
makedepends=(
  'cmake'
  'git'
  'libfdk-aac'
  'libxcomposite'
  'luajit'
  'pipewire'
  'python'
  'qt6-wayland'
  'sndio'
  'swig'
  'vlc'
  'wayland'
  'x264'
  'xdg-desktop-portal'

  # Deps of Websocket plugin
  'nlohmann-json'
  'websocketpp'
  'asio'

  # Deps of Browser plugin
  'cef-minimal-obs-bin'
)
optdepends=('libfdk-aac: FDK AAC codec support'
            'libva-intel-driver: ffmpeg hardware encoding'
            'libva-mesa-driver: ffmpeg hardware encoding'
            'libxcomposite: xcomposite capture support'
            'luajit: scripting support'
            'onevpl-intel-gpu: quicksync hardware Encoding'
            'pipewire: pipewire capture support'
            'python: scripting support'
            'sndio: Sndio input client'
            'v4l2loopback-dkms: virtual camera support'
            'vlc: vlc media source support'
            'xdg-desktop-portal: pipewire capture support')
provides=("obs-studio=$pkgver" "obs-websocket" "obs-browser")
conflicts=("obs-studio" "obs-websocket" "obs-browser" "obs-linuxbrowser")
source=("obs-studio::git+https://github.com/obsproject/obs-studio.git#tag=$pkgver"
        "obs-browser::git+https://github.com/obsproject/obs-browser.git"
        "obs-websocket::git+https://github.com/obsproject/obs-websocket.git"
        fix_python_binary_loading.patch
        add_ffmpeg_vaapi_av1.patch)
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'bdfbd062f080bc925588aec1989bb1df34bf779cc2fc08ac27236679cf612abd'
            '539adb1a8c5e18fd589153a9e23642da0d79bc882be4f1c4bae9d72f7b6008d8')

prepare() {
  cd obs-studio

  git config submodule.plugins/obs-browser.url $srcdir/obs-browser
  git config submodule.plugins/obs-websocket.url $srcdir/obs-websocket
  git -c protocol.file.allow=always submodule update

  patch -Np1 < "$srcdir"/fix_python_binary_loading.patch
  patch -Np1 < "$srcdir"/add_ffmpeg_vaapi_av1.patch
}

build() {
  cmake -B build -S obs-studio \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DBUILD_BROWSER=ON \
    -DCEF_ROOT_DIR="/opt/cef-obs" \
    -DENABLE_VST=ON \
    -DENABLE_JACK=ON \
    -DENABLE_LIBFDK=ON \
    -DOBS_VERSION_OVERRIDE="$pkgver-$pkgrel" \
    -DCALM_DEPRECATION=ON \
    -Wno-dev
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}