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
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=gamja
pkgver=1.0.0_beta1-r13
pkgrel=0
pkgdesc="Simple IRC web client"
url="https://sr.ht/~emersion/gamja/"
license="AGPL-3.0"
arch="all"
makedepends="npm"
subpackages="$pkgname-doc"
githash=b1d5f1436ef8a44d48df8b56f5a530827d5ad83f
source="
$pkgname-$pkgver.tar.gz::https://git.sr.ht/~emersion/gamja/archive/$githash.tar.gz
0001-Add-custom-chat.sr.ht-noscript-page.patch
"
builddir="$srcdir/$pkgname-$githash"
options="!check" # no test suite
build() {
npm install --include=dev
npm run build
}
package() {
local webroot="$pkgdir"/usr/share/webapps/gamja
install -d "$webroot" "$pkgdir"/usr/share/doc/gamja
cp -r "$builddir"/dist/* "$webroot"
install -Dm644 "$builddir"/README.md "$pkgdir"/usr/share/doc/gamja
# default empty config
echo "{}" >config.json
install -Dm644 config.json "$pkgdir"/etc/gamja/config.json
ln -s /etc/gamja/config.json "$pkgdir"/usr/share/webapps/gamja/config.json
}
sha512sums="
ab6b1b979336e464e3b116e7dc609e688807a017076dce046a40951744c84955f683555b5ebb61d148bcf1309d7b7eb4e4f2073685dfc037d6fb72fe33d9855f gamja-1.0.0_beta1-r13.tar.gz
7ebb5050f197881169ded60f16af23e9adc454b8f607192948ca8a4d36452daaec55aa85b938c61b58bc70fcbbe9f10a99c0f8d436374562edd448df9c63c34a 0001-Add-custom-chat.sr.ht-noscript-page.patch
"