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
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=gamja
pkgver=1.0.0_beta1-r11
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=a120d79585fab9690f4b1fe74d2524909ae708a8
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~emersion/gamja/archive/$githash.tar.gz"
builddir="$srcdir/$pkgname-$githash"
options="!check" # no test suite
build() {
npm install --production
}
package() {
local webroot="$pkgdir"/usr/share/webapps/gamja
install -d "$webroot" "$pkgdir"/usr/share/doc/gamja
cp -r "$builddir"/* "$webroot"
mv "$webroot"/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="
f92e5abe089af0da4e287afef58fba5ff1033c20b14604da6b3f078eceb8127040ae0f0f75f639effcd1a0e089d8fb97c1a805eddf6d61a6f6748b1a65c19480 gamja-1.0.0_beta1-r11.tar.gz
"