blob: 1dbf936cb03b5ff6fdbf651a35c849f5a80e1b62 (
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
|
#!/bin/bash
# Maintainer: Kimiblock Moe
pkgname=(cinny-web)
pkgbase=cinny
pkgver=4.2.3
pkgrel=1
pkgdesc='Yet another matrix client — web version'
arch=(any)
license=(AGPL-3.0-or-later)
depends=()
url=https://github.com/cinnyapp/cinny
#makedepends=(npm git yarn)
makedepends=(npm yarn)
#source=("git+https://github.com/cinnyapp/cinny#tag=v${pkgver}")
source=(
cinny-${pkgver}.tar.gz::"https://github.com/cinnyapp/cinny/archive/refs/tags/v${pkgver}.tar.gz"
)
sha512sums=('39419d2e0c245bae44cd70e2070c60be8d32ed3547a8179675e99dba40d4edd9aa56d9c5a9c4f94c5c217ae96b504dcd1b23847da261646a2922da412fbe958d')
function prepare() {
NODE_OPTIONS="--max_old_space_size=4096"
cd "cinny-${pkgver}"
#yarn
npm install --legacy-peer-deps
}
build() {
if [ ! ${cinnyBase} ]; then
cinnyBase='/'
fi
sed -i "s|/|${cinnyBase}|g" "${srcdir}"/"cinny-${pkgver}"/build.config.ts
cd "cinny-${pkgver}"
NODE_OPTIONS="--max_old_space_size=4096"
#yarn dist
#yarn run build
npm run build
}
package_cinny-web() {
url=https://github.com/cinnyapp/cinny
NODE_OPTIONS="--max_old_space_size=4096"
backup=('etc/webapps/cinny/config.json')
cd "cinny-${pkgver}"
install -d "$pkgdir/usr/share/webapps/$pkgbase"
cp -r dist/* "$pkgdir/usr/share/webapps/$pkgbase"
install -d "$pkgdir/etc/webapps/$pkgbase"
mv "${pkgdir}/usr/share/webapps/$pkgbase/config.json" \
"${pkgdir}/etc/webapps/$pkgbase/config.json"
ln -sfr "${pkgdir}/etc/webapps/$pkgbase/config.json" \
"${pkgdir}/usr/share/webapps/$pkgbase/config.json"
}
|