recipe 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Build recipe for nodejs.
  2. #
  3. # Copyright (C) 2018 Kevin "The Nuclear" Bloom, <kdb4@openmailbox.org>
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. # Based on recipes written by Mateus P. Rodrigues, <mprodrigues@dragora.org>
  18. # and Matias Fonzo, <selk@dragora.org>.
  19. program=node
  20. version=8.11.2
  21. release=1
  22. tarname=${program}-v${version}.tar.gz
  23. srcdir=${program}-v${version}
  24. # Remote source(s)
  25. fetch=http://nodejs.org/dist/v${version}/${tarname}
  26. description="
  27. nodejs - a JavaScript runtime engine
  28. Node.js is a JavaScript runtime built on Chrome's
  29. V8 JavaScript engine. Node.js uses an event-driven,
  30. non-blocking I/O model that makes it lightweight and
  31. efficient. Node.js' package ecosystem, npm, is the
  32. largest ecosystem of open source libraries in the world.
  33. "
  34. homepage=https://nodejs.org/
  35. license="MIT"
  36. # Source documentation
  37. jdocs="AUTHORS BUILDING.md CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md CPP_STYLE_GUIDE.md GOVERNANCE.md LICENSE README.md"
  38. docsdir="${docdir}/${program}-${version}"
  39. build()
  40. {
  41. set -e
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  45. # $configure_args \
  46. --libdir=/usr/lib${libSuffix} \
  47. --infodir=$infodir \
  48. --mandir=$mandir \
  49. --docdir=$docdir \
  50. --build="$(cc -dumpmachine)"
  51. make -j${jobs} V=1
  52. make -j${jobs} DESTDIR="$destdir" install
  53. # Delete index file for the package
  54. if test -d "${destdir}/$infodir"
  55. then
  56. rm -f "${destdir}/${infodir}/dir"
  57. fi
  58. # Copy documentation
  59. mkdir -p "${destdir}${docsdir}"
  60. for file in $docs
  61. do
  62. if test -e $file
  63. then
  64. cp -p $file "${destdir}${docsdir}"
  65. fi
  66. done
  67. }
  68. s