ptrcports/node-print/APKBUILD

36 lines
1.1 KiB
Text
Raw Normal View History

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