blob: 9da462bbb0d1d9402646f5d16253c303fe6de5a0 (
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
|
pkgname=livekit-git
pkgver=1.7.0.r63.g18fd6228
pkgrel=1
epoch=1
pkgdesc="End-to-end stack for WebRTC. SFU media server and SDKs."
arch=("any")
url="https://github.com/livekit/livekit"
license=("GPL-2.0-or-later")
depends=()
makedepends=('go' 'git' "mage" "bubblewrap")
backup=()
source=("git+https://github.com/livekit/livekit.git")
sha256sums=('SKIP')
provides=(livekit)
#install="livekit.install"
function pkgver() {
cd "${srcdir}/livekit"
git describe --long --tags --abbrev=8 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
function prepare() {
# Setup a bubblewrap jail so it won't mess up host environment.
if [ -d "${srcdir}/build-jail" ]; then
rm -rf "${srcdir}/build-jail"
fi
mkdir "${srcdir}/build-jail" -p
cp -a "${srcdir}/livekit"/* "${srcdir}/build-jail"
bwrap --dev-bind / / \
--tmpfs ~ \
--tmpfs /tmp \
--bind "${srcdir}/build-jail" /tmp/build \
--chdir /tmp/build \
-- go mod download
}
function build() {
cd "${srcdir}/build-jail"
bwrap --dev-bind / / \
--tmpfs ~ \
--tmpfs /tmp \
--bind "${srcdir}/build-jail" /tmp/build \
--chdir /tmp/build \
-- mage
}
#function check() {
# cd "${srcdir}/livekit"
# go test ./...
#}
function package() {
install -Dm755 "${srcdir}/build-jail/bin/livekit-server" "${pkgdir}/usr/bin/livekit-server"
install -Dm644 "${srcdir}/livekit/config-sample.yaml" "${pkgdir}/etc/livekit/config.yaml"
}
|