2022-08-27 11:01:43 +00:00
|
|
|
# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
|
|
|
|
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
|
|
|
|
pkgname=node-print
|
2023-05-19 17:59:00 +00:00
|
|
|
pkgver=13
|
2022-08-27 11:01:43 +00:00
|
|
|
pkgrel=0
|
|
|
|
pkgdesc="another terrible javascript engine wrapper"
|
|
|
|
url="https://git.ddd.rip/ptrcnull/ptrcports"
|
2023-05-03 02:05:27 +00:00
|
|
|
arch="noarch !armhf !armv7" # hangs on tests
|
2022-08-27 11:01:43 +00:00
|
|
|
license="BSD-2-Clause"
|
|
|
|
depends="nodejs-current"
|
2023-05-15 15:25:20 +00:00
|
|
|
source="
|
|
|
|
np
|
|
|
|
index.js
|
|
|
|
test.js
|
|
|
|
"
|
2022-08-27 11:01:43 +00:00
|
|
|
builddir="$srcdir"
|
|
|
|
|
|
|
|
check() {
|
2023-05-15 15:25:20 +00:00
|
|
|
node --experimental-test-coverage --test > output.txt
|
2023-05-15 15:32:14 +00:00
|
|
|
|
2023-05-15 15:25:20 +00:00
|
|
|
# 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
|
2023-06-01 14:34:53 +00:00
|
|
|
29f694b1598de9eb61dce7c259247dbb9716dc4176e4a6c81650a3ec6b047d965e7b5ad32c803c8b97bfa8d0819aae6c86d1309bdce93f9dc29dba990ef192ba index.js
|
|
|
|
9b13784855f3d01b3ab89b15dce6c59949a103ed139e5d858720b064f248dd9bbeca57d7113eed818652f064714054b77a0d7d53097024ead84a21ad69d536d6 test.js
|
2022-08-27 11:01:43 +00:00
|
|
|
"
|