~dricottone/huttese-apk

36541a8e11e9571669ff143dd279537bb9386223 — Simon Ser 3 years ago 4f9cef5
gamja: new package
1 files changed, 36 insertions(+), 0 deletions(-)

A sr.ht/gamja/APKBUILD
A sr.ht/gamja/APKBUILD => sr.ht/gamja/APKBUILD +36 -0
@@ 0,0 1,36 @@
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=gamja
pkgver=1.0.0_beta1-r9
pkgrel=0
pkgdesc="Simple IRC web client"
url="https://sr.ht/~emersion/gamja/"
license="AGPL-3.0"
arch="noarch !mips64 !riscv64" # blocked by nodejs
makedepends="npm"
subpackages="$pkgname-doc"
githash=a890665775910143c39bc044714141b3853d1e0a
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="
012f01f38f855c595a25e231a49f536da03aae47c2a0fac9df18657f541d4b9311239c23887121c4857364eff17c163a94eaa2f0dda0a8d45a652529b7085836  gamja-1.0.0_beta1-r9.tar.gz
"