summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7d55cd51f58e1217ec62be4133efb4fe398bb0ab (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
pkgname=jitsi-meet
# https://github.com/jitsi/jitsi-meet/releases/latest
pkgver=1.0.4074
_tag="jitsi-meet_4548"
pkgrel=1
pkgdesc="WebRTC JavaScript video conferences"
arch=("x86_64")
url="https://github.com/jitsi/jitsi-meet"
license=("Apache")
makedepends=("git" "npm")
optdepends=("jicofo"
            "jitsi-videobridge"
            "nginx"
            "prosody")
backup=("opt/jitsi-meet/config.js"
        "opt/jitsi-meet/interface_config.js"
        "opt/jitsi-meet/logging_config.js")
options=("!strip")
source=($pkgname-$pkgver.tar.gz::https://github.com/jitsi/jitsi-meet/archive/stable/$_tag.tar.gz)
md5sums=('c3c89157484d207255657584f9ccdd14')

build() {
    cd "${srcdir}/${pkgname}-stable-${_tag}"
    # this seems to break the package, even though it is the documented way of packaging
    #npm install -g --user root --prefix "$pkgdir/usr"
    npm install
    # fix as many vulns as possible, but seems to break the package as well
    #npm audit fix
    # Make fails with more than one thread
    make -j1
}

package() {
    install -d "${pkgdir}/opt"
    cp -R "${srcdir}/${pkgname}-stable-${_tag}/" "${pkgdir}/opt/jitsi-meet"

    # get rid of all local references
    find "${pkgdir}" -type f -execdir sed -i "s#$srcdir##g" "{}" \;

    # Non-deterministic race in npm gives 777 permissions to random directories.
    # See https://github.com/npm/npm/issues/9359 for details.
    find "${pkgdir}" -type d -exec chmod 755 {} +

    # npm gives ownership of ALL FILES to build user
    # https://bugs.archlinux.org/task/63396
    chown -R root:root "${pkgdir}"
}