summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d53533c9cf9cd5852e4add858c559f175a962ec0 (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
pkgname=kms-core
pkgver=6.13.0
pkgrel=4
pkgdesc="Kurento media server core library"
arch=(x86_64)
url="https://github.com/Kurento/kms-core"
license=(apache)
depends=(boost libsigc++ glibmm gstreamer gst-plugins-base kms-jsoncpp kms-jsonrpc)
makedepends=(kms-cmake-utils kurento-module-creator libvpx)
source=(
    "git://github.com/Kurento/$pkgname.git#tag=$pkgver"
    cmake-boost.patch
    kmscore.c.patch
    register-parent-string.patch
)
sha256sums=(SKIP SKIP SKIP SKIP)
backup=(
    etc/kurento/modules/kurento/BaseRtpEndpoint.conf.ini
    etc/kurento/modules/kurento/MediaElement.conf.ini
    etc/kurento/modules/kurento/SdpEndpoint.conf.json
    etc/kurento/modules/kurento/UriEndpoint.conf.ini
)

prepare() {
    cd "$srcdir/$pkgname"
    patch -p0 <"$srcdir/cmake-boost.patch"
    patch -p1 <"$srcdir/kmscore.c.patch"
    patch -p0 <"$srcdir/register-parent-string.patch"
    sed -ri -e 's#gstreamer((-[-a-z]+)?)-1\.5#gstreamer\1-1.0#g' {,*/,*/*/,*/*/*/,*/*/*/*/}CMakeLists.txt
}

build() {
    local builddir=$srcdir/$pkgname/build
    rm -rf "$builddir"
    mkdir "$builddir"
    cd "$builddir"
    cmake -DCMAKE_MODULE_PATH=/usr/share/cmake/Modules -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_BUILD_TYPE=Release ..
    make
}

package() {
    local builddir=$srcdir/$pkgname/build
    cd "$builddir"
    make install DESTDIR="$pkgdir"
}