# Maintainer: Celogeek _basename=jitsi _pkgname=meet _tag=7874 _version=1.0.7874 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=('964af878a26d16ca543ae9a06b9a6b1b2b8c4831dd403135ba7b44fb753329a3')