ws-8.13.0.ebuild (985B)
- # Copyright 2022-2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
- # Distributed under the terms of the GNU General Public License v2
- EAPI=8
- inherit nodejs optfeature
- DESCRIPTION="Simple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js"
- HOMEPAGE="https://github.com/websockets/ws"
- SRC_URI="https://github.com/websockets/ws/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
- LICENSE="MIT"
- SLOT="0"
- KEYWORDS="~amd64"
- RESTRICT="test"
- src_install() {
- einstalldocs
- dodoc -r doc/* examples
- insinto "${NODEJS_SITELIB}${PN}"
- doins package.json
- # Taken from package.json .files manually due to lib/*.js
- doins -r browser.js index.js lib/*.js wrapper.mjs
- }
- pkg_postinst() {
- if has_version '<dev-lang/nodejs-18.14.0'; then
- optfeature "(<nodejs-18.14.0) efficiently check if a message contains valid UTF-8" \
- dev-nodejs/utf-8-validate
- fi
- optfeature "efficiently perform operations such as masking and unmasking" \
- dev-nodejs/bufferutil
- }