# Maintainer: PktSurf <smlinux@pktsurf.in>
app=nodejs
version=18.14.2
build=1sml
homepage="https://nodejs.org/en/"
desc="Asynchronous event-driven Javascript engine designed to build scalable network applications"
requires="openssl"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf node-v"$version"

  tar xf $srcdir/node-v"$version".tar.?z*
  cd node-v"$version"
  fixbuilddirpermissions
}

build() {
  ./configure \
    --prefix=/ \
    --shared-zlib \
    --shared-openssl

  make
  make install DESTDIR=$pkg 

  install -Dm 644 LICENSE $pkgdocs/LICENSE

  mkfinalpkg
}

sha512sums="
44c874e47ffdd5a9068541eaf553ed3de0baa470f0016a601aae9e840d7baf82bcb4f6bc1f74cf06a4882c83f67e8a77f95d4c79993e70873760c0f51aff4593  node-v18.14.2.tar.gz
"
