+# Contributor: sev <alpine@sev.monster>
+# Maintainer: sev <alpine@sev.monster>
+pkgname=ariang
+pkgname_=AriaNg
+pkgver=1.2.4
+pkgrel=0
+pkgdesc="A modern web frontend making aria2 easier to use."
+url="https://github.com/mayswind/AriaNg"
+arch="noarch"
+license="MIT"
+makedepends="libstdc++ coreutils curl"
+source="https://github.com/mayswind/$pkgname_/archive/$pkgver/$pkgname_-$pkgver.tar.gz"
+builddir="$srcdir/$pkgname_-$pkgver"
+# no test suite
+options="!check"
+
+build() {
+ export NVM_DIR="$builddir/.nvm"
+ mkdir "$NVM_DIR"
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | sh
+ . "$NVM_DIR/nvm.sh"
+ export NVM_NODEJS_ORG_MIRROR=https://unofficial-builds.nodejs.org/download/release
+ nvm_get_arch() { nvm_echo x64-musl; }
+ nvm install 10.23
+ npm install
+ npx browserslist@latest --update-db
+ ./node_modules/gulp/bin/gulp.js clean build
+}
+
+package() {
+ mkdir -p "$pkgdir/usr/share/webapps"
+ cp -a dist "$pkgdir/usr/share/webapps/$pkgname"
+}
+sha512sums="
+15d9902a1d894cad3ef0fc7de40701f1a419d563b1a81a9f010a06bec93d3d01b2320d0a0c5e4ed10c8951febf1ed42af361560c3d12a051fd14ed7716bf29a3 AriaNg-1.2.4.tar.gz
+"