]> git.armaanb.net Git - asd-repo.git/blob - extra/nodejs/build
Switch browser to Chromium
[asd-repo.git] / extra / nodejs / build
1 #!/bin/sh -e
2
3 # Fix python3.
4 sed -i 's|(3, 8)|(3, 9), (3, 8)|g' configure
5
6 # Don't link with libatomic on LLVM systems.
7 sed -i "s/\\'libraries\\'\\: \\[\\'-latomic\\'\\],/#/g" node.gyp
8
9 CC=cc CXX=c++ ./configure \
10     --prefix=/usr \
11     --shared-zlib \
12     --without-intl \
13     --without-etw \
14     --without-dtrace \
15     --without-report \
16     --without-node-snapshot \
17     --without-node-code-cache \
18     --ninja
19
20 ninja -C out/Release
21 tools/install.py install "$1" /usr
22
23 # Remove unneeded files.
24 rm -rf "$1/usr/include/node/openssl"
25 rm -rf "$1/usr/lib/node_modules/npm/scripts"
26 rm -f  "$1/usr/lib/node_modules/npm/configure"
27
28 # Install the license
29 install -Dm755 LICENSE "$1/usr/share/LICENSES/nodejs.license"