summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d1b4697bf955da81bd0bd67d15d86bb73c068d74 (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
# Maintainer: Jay Schmidek <jschmidek at gmail dot com>
# Maintainer: Paul-Louis Ageneau <paul-louis at ageneau dot org>

pkgname=libdatachannel
pkgver=v0.13.0
pkgrel=1
pkgdesc="C/C++ WebRTC Data Channels and Media Transport standalone library"
arch=('x86_64')
url="https://github.com/paullouisageneau/$pkgname"
license=('LGPL')
makedepends=('git' 'cmake')
depends=('openssl' 'libsrtp')
provides=("$pkgname")
conflicts=("$pkgname")
source=("git+https://github.com/paullouisageneau/$pkgname.git#tag=$pkgver")
md5sums=('SKIP')

prepare() {
    cd "$pkgname"
    git submodule init
    git submodule update "$srcdir"/"$pkgname"/deps/{libsrtp,usrsctp,plog,libjuice}
}

build() {
    cd "$pkgname"
    rm -rf build
    cmake -B build -DUSE_NICE=0 -DUSE_GNUTLS=0 -DUSE_SYSTEM_SRTP=1 -DNO_TESTS=1 -DNO_EXAMPLES=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
    cd build
    make
}

package() {
    cd "$pkgname"
    install -m755 -d "$pkgdir"/usr/include/"$pkgname"
    install -m644 include/rtc/*.{hpp,h} "$pkgdir"/usr/include/"$pkgname"
    install -m755 -d "$pkgdir"/usr/lib
    install -m755 build/"$pkgname".so "$pkgdir"/usr/lib
}