blob: 01274a3ab372c95812f156dbb3752ab1d3dab137 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Maintainer: Celogeek <arch-aur-f5d67e@celogeek.com>
_basename=jitsi
_pkgname=meet
_tag=8242
_version=1.0.8242
pkgname=${_basename}-${_pkgname}
pkgver=${_version}
pkgrel=1
pkgdesc="Jitsi Meet Web"
arch=('any')
url="https://jitsi.org/jitsi-meet/"
license=('Apache')
depends=()
optdepends=("nginx")
makedepends=(
"git"
"python"
"nodejs" "npm"
)
options=('!strip')
backup=(
"etc/webapps/${pkgname}/config.js"
"etc/webapps/${pkgname}/interface_config.js"
)
source=(
"$pkgname::git+https://github.com/jitsi/jitsi-meet#tag=${_tag}"
)
install=install
build() {
cd "$pkgname"
npm install # --no-package-lock
sed -i.bak 's!NODE_OPTIONS=--max-old-space-size=8192!NODE_OPTIONS="--openssl-legacy-provider --max-old-space-size=8192"!' Makefile
make
make source-package
}
package() {
cd "$srcdir/$pkgname"
DESTDIR="${pkgdir}/usr/share/webapps/${pkgname}"
CONFDIR="${pkgdir}/etc/webapps/${pkgname}"
install -d "$DESTDIR"
install -d "$CONFDIR"
tar xjvf "jitsi-meet.tar.bz2" -C "$DESTDIR" --strip 1
install -Dm644 -t "$DESTDIR" manifest.json
for l in $(node -p "Object.keys(require('./lang/languages.json')).join(' ')")
do
c=${l:0:2}
if [ -f "node_modules/i18n-iso-countries/langs/${c}.json" ]
then
install -m644 "node_modules/i18n-iso-countries/langs/${c}.json" "${DESTDIR}/lang/countries-${l}.json"
fi
done
find "$DESTDIR" -type f -execdir sed -i "s#${srcdir}##g" "{}" \;
find "$DESTDIR" -type d -exec chmod 755 {} \;
for i in interface_config.js config.js
do
install -Dm644 "$DESTDIR/${i}" "$CONFDIR/${i}"
ln -sf "/etc/webapps/${pkgname}/${i}" "$DESTDIR/${i}"
done
install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" doc/debian/jitsi-meet/jitsi-meet.example doc/debian/jitsi-meet/jitsi-meet.example-apache config.js
sed -i 's@/usr/share/jitsi-meet@/usr/share/webapps/'$pkgname'@' "${pkgdir}/usr/share/doc/${pkgname}/"*
sed -i 's@/etc/jitsi/meet@/etc/webapps/'$pkgname'@' "${pkgdir}/usr/share/doc/${pkgname}/"*
chown -R root:root "${pkgdir}"
}
sha256sums=('831ba870b78e277ebc3baad408fd89b79decdb531a443f0d4b5063cb925ed29a')
|