~dricottone/huttese-apk

7d0e4e96a309d89a8b6ec524ac2255f3ed48c97a — Simon Ser 2 years ago 4d69eb9
gamja: upgrade and use new build system

gamja now supports bundling the webapp with a build system.
1 files changed, 7 insertions(+), 6 deletions(-)

M sr.ht/gamja/APKBUILD
M sr.ht/gamja/APKBUILD => sr.ht/gamja/APKBUILD +7 -6
@@ 1,7 1,7 @@
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=gamja
pkgver=1.0.0_beta1-r11
pkgver=1.0.0_beta1-r12
pkgrel=0
pkgdesc="Simple IRC web client"
url="https://sr.ht/~emersion/gamja/"


@@ 9,21 9,22 @@ license="AGPL-3.0"
arch="all"
makedepends="npm"
subpackages="$pkgname-doc"
githash=a120d79585fab9690f4b1fe74d2524909ae708a8
githash=c4c0a771625376649620f0600b945a0f2f985937
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
	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"/* "$webroot"
	mv "$webroot"/README.md "$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


@@ 32,5 33,5 @@ package() {
}

sha512sums="
f92e5abe089af0da4e287afef58fba5ff1033c20b14604da6b3f078eceb8127040ae0f0f75f639effcd1a0e089d8fb97c1a805eddf6d61a6f6748b1a65c19480  gamja-1.0.0_beta1-r11.tar.gz
8ee19de44b9566f61ef0cd83a6a06e6a72f380d380ca3779fc1c45a4962faef1ecfa04010a2d0cfa1110276f2f6f554ef18c72b563b17bb392755b2ab0064472  gamja-1.0.0_beta1-r12.tar.gz
"