37 lines
1.2 KiB
Text
37 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 cov_lines="$(grep -F index.js output.txt | cut -d' ' -f4 | cut -d. -f1)"
|
|
[ "$cov_lines" -gt 90 ]
|
|
local cov_branches="$(grep -F index.js output.txt | 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
|
|
8741fd49d035d28f93dcb417b65254fd7c60a3027287749cab11d71cbeca91ea8ae5c18fab739d5c4f90c3e0029c831a333003444b7c5ed1ef84888c97ffdae1 index.js
|
|
9b13784855f3d01b3ab89b15dce6c59949a103ed139e5d858720b064f248dd9bbeca57d7113eed818652f064714054b77a0d7d53097024ead84a21ad69d536d6 test.js
|
|
"
|