summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiachen YANG2021-01-08 10:46:29 +0900
committerJiachen YANG2021-01-08 10:46:29 +0900
commit615de89b62ff923b41d02442e5b3b2f7f89572b0 (patch)
treedd7179fa8aeb3fe725bca8ff2ee8394af2ff7aa5
downloadaur-615de89b62ff923b41d02442e5b3b2f7f89572b0.tar.gz
addpkg libtg_owt-git as depends for telegram-desktop-git
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD56
2 files changed, 88 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..094241bb0b1e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = libtg_owt-git
+ pkgdesc = WebRTC library - static linked, git version
+ pkgver = 0.git.r73.d91d618
+ pkgrel = 1
+ url = https://github.com/desktop-app/tg_owt
+ arch = x86_64
+ license = custom:BSD
+ makedepends = git
+ makedepends = ninja
+ makedepends = unzip
+ makedepends = cmake
+ makedepends = libxrandr
+ makedepends = libxcomposite
+ makedepends = openssl
+ makedepends = glibc
+ makedepends = ffmpeg
+ makedepends = libva
+ makedepends = opus
+ makedepends = yasm
+ makedepends = libjpeg-turbo
+ depends = protobuf
+ provides = libtg_owt
+ conflicts = libtg_owt
+ options = staticlibs
+ source = tg_owt::git+https://github.com/desktop-app/tg_owt.git
+ source = libvpx::git+https://chromium.googlesource.com/webm/libvpx.git
+ source = libyuv::git+https://chromium.googlesource.com/libyuv/libyuv.git
+ b2sums = SKIP
+ b2sums = SKIP
+ b2sums = SKIP
+
+pkgname = libtg_owt-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b1b1c8ee3d7a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Jiachen YANG <farseerfc at archlinux dot org>
+
+_pkgname=libtg_owt
+pkgname=${_pkgname}-git
+pkgver=0.git.r73.d91d618
+pkgrel=1
+pkgdesc='WebRTC library - static linked, git version'
+arch=('x86_64')
+url='https://github.com/desktop-app/tg_owt'
+license=('custom:BSD')
+depends=('protobuf')
+makedepends=('git' 'ninja' 'unzip' 'cmake' 'libxrandr' 'libxcomposite' 'openssl' 'glibc' 'ffmpeg' 'libva' 'opus' 'yasm' 'libjpeg-turbo')
+options=('staticlibs')
+source=("tg_owt::git+${url}.git"
+ "libvpx::git+https://chromium.googlesource.com/webm/libvpx.git"
+ "libyuv::git+https://chromium.googlesource.com/libyuv/libyuv.git")
+b2sums=('SKIP'
+ 'SKIP'
+ 'SKIP')
+provides=('libtg_owt')
+conflicts=('libtg_owt')
+
+pkgver(){
+ cd $srcdir/tg_owt
+ printf "0.git.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd tg_owt
+ git submodule init
+ git config submodule.src/third_party/libvpx/source/libvpx.url "$srcdir"/libvpx
+ git config submodule.src/third_party/libyuv.url "$srcdir"/libyuv
+ git submodule update
+}
+
+build() {
+ cd tg_owt
+ mkdir build
+ cd build
+ # path to openssl include is intentionally wrong, so that it will not mess up srtp include headers
+ cmake -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DTG_OWT_SPECIAL_TARGET=linux \
+ -DTG_OWT_LIBJPEG_INCLUDE_PATH=/usr/include \
+ -DTG_OWT_OPENSSL_INCLUDE_PATH=/usr/include \
+ -DTG_OWT_OPUS_INCLUDE_PATH=/usr/include/opus \
+ -DTG_OWT_FFMPEG_INCLUDE_PATH=/usr/include \
+ ..
+ ninja
+}
+
+package() {
+ cd tg_owt/build
+ DESTDIR="${pkgdir}/" ninja install
+}