ptrcports/node-print/APKBUILD
2024-01-26 16:41:47 +01:00

38 lines
1.2 KiB
Text

# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=node-print
pkgver=15
pkgrel=0
pkgdesc="another terrible javascript engine wrapper"
url="https://git.ddd.rip/ptrcnull/ptrcports"
arch="noarch !armhf !armv7" # hangs on tests
license="BSD-2-Clause"
depends="nodejs-current"
source="
np
index.js
test.js
"
builddir="$srcdir"
check() {
node --experimental-test-coverage --test > output.txt
# ensure coverage
local results="$(grep -F index.js output.txt)"
local cov_lines="$(echo $results | cut -d' ' -f4 | cut -d. -f1)"
[ "$cov_lines" -gt 90 ]
local cov_branches="$(echo $results | cut -d' ' -f6 | cut -d. -f1)"
[ "$cov_branches" -gt 90 ]
}
package() {
install -Dm755 np "$pkgdir"/usr/bin/np
install -Dm644 index.js "$pkgdir"/usr/lib/node/ptrc/index.js
}
sha512sums="
b3dfdeb49637be33d2e2718c5abcf35a87dd55023918c99341273c3b38bd6685189d1f786451a742c47c5f3bc3b58555decb58e2a3a018c9b9ee92043f8fac03 np
90801db95514a0f5d4d86e044b18a973ceae5852188c341da18b6c0f9941d0f09daad7eecadc35562e4dde35e9218cbd40201b2eb87e8a30b00befb73149f3a8 index.js
b5dad134c46a13e832eeccd83541bf75681e6e3dfefc47ad41836a5eb29419d8c2c3bc06ca3909beadf766f72d1277160cb9b01dd9fb2203654c75d8209c08d9 test.js
"