# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=gamja
pkgver=1.0.0_beta1-r10
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=21a4a715422a99193790cd45d223b3eb673dd3b2
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="
899d0ea99d5f01d8d8e98f88b7bbc0a67dd31fadffaba60528b474a7c7c2a54e31fc01ad39eb5ea17b545b890083deca45c03650b0e0922704efb647cea8ea2e gamja-1.0.0_beta1-r10.tar.gz
"