upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / libtg_owt / trunk / PKGBUILD
blob93717c2f286f277313172e2b378d05a5fcfa830f
1 # Maintainer: Jiachen YANG <farseerfc at archlinux dot org>
2 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
4 pkgname=libtg_owt
5 # It seems the currently desired version can be gotten from
6 # https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/build/docker/centos_env/Dockerfile
7 _commit=9d120195334db4f232c925529aa7601656dc59d7
8 pkgver=0.git21.${_commit:0:7}
9 pkgrel=1
10 pkgdesc='WebRTC library'
11 arch=('x86_64')
12 url='https://github.com/desktop-app/tg_owt'
13 license=('BSD')
14 # libdrm is dynamically loaded via dlopen
15 depends=('libdrm')
16 makedepends=('git' 'ninja' 'unzip' 'cmake' 'protobuf' 'libxrandr' 'libxcomposite' 'openssl' 'glibc'
17              'ffmpeg' 'libva' 'opus' 'yasm' 'libjpeg-turbo' 'pipewire' 'libxtst' 'libepoxy')
18 options=('staticlibs')
19 source=("tg_owt::git+${url}.git#commit=${_commit}"
20         "libvpx::git+https://chromium.googlesource.com/webm/libvpx.git"
21         "libyuv::git+https://chromium.googlesource.com/libyuv/libyuv.git"
22         "pipewire::git+https://github.com/PipeWire/pipewire.git")
23 b2sums=('SKIP'
24         'SKIP'
25         'SKIP'
26         'SKIP')
28 prepare() {
29   cd tg_owt
30   git submodule init
31   git config submodule.src/third_party/libvpx/source/libvpx.url "$srcdir"/libvpx
32   git config submodule.src/third_party/libyuv.url "$srcdir"/libyuv
33   git config submodule.src/third_party/pipewire.url "$srcdir"/pipewire
34   git -c protocol.file.allow=always submodule update
37 build() {
38   cd tg_owt
40   export CFLAGS+=" -ffat-lto-objects"
41   export CXXFLAGS+=" -ffat-lto-objects -I/usr/include/libdrm"
42   # Upstream stated that only static builds are really supported so that's what we'll do.
43   # https://github.com/desktop-app/tg_owt/issues/75#issuecomment-992061171
44   cmake \
45     -B build \
46     -G Ninja \
47     -DCMAKE_BUILD_TYPE=Release \
48     -DCMAKE_INSTALL_PREFIX=/usr \
49     -DBUILD_SHARED_LIBS=OFF
50   ninja -C build
53 package() {
54   cd tg_owt
55   DESTDIR="${pkgdir}/" ninja -C build install
56   install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE