Files
nodejs/source.sh
T

50 lines
2.0 KiB
Bash

# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
./configure --prefix=/usr \
--shared-brotli \
--shared-cares \
--shared-libuv \
--shared-openssl \
--shared-nghttp2 \
--shared-zlib \
--without-npm \
--with-intl=system-icu
make
}
# The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly
check() {
# Remove failing tests
rm test/parallel/test-http2-client-set-priority.js
rm test/parallel/test-http2-priority-event.js
rm test/parallel/test-http-outgoing-end-cork.js
rm test/parallel/test-http2-client-unescaped-path.js
rm test/parallel/test-http2-multi-content-length.js
rm test/parallel/test-http2-reset-flood.js
rm test/parallel/test-http2-misbehaving-flow-control.js
rm test/parallel/test-http2-max-invalid-frames.js
rm test/parallel/test-http2-misbehaving-flow-control-paused.js
rm test/parallel/test-tls-ocsp-callback.js
rm test/client-proxy/test-http-proxy-request-no-proxy-port-specific.mjs
rm test/pseudo-tty/test-set-raw-mode-reset.js
rm test/pseudo-tty/test-set-raw-mode-reset-signal.js
rm test/pseudo-tty/test-set-raw-mode-reset-process-exit.js
make test-only
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
make DESTDIR="$BPM_OUTPUT" install
# Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/nodejs/LICENSE
}