logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

ws-8.13.0.ebuild (985B)


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