opt/nodejs/Pkgfile
2021-11-14 22:52:19 +11:00

45 lines
1.1 KiB
Plaintext

# Description: Evented I/O for V8 javascript.
# URL: https://nodejs.org/
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: openssl libuv zlib
# Optional: brotli c-ares icu nghttp2-libs ninja
name=nodejs
version=17.1.0
release=1
source=(https://nodejs.org/dist/v$version/node-v$version.tar.xz
system-c-ares.patch)
build() {
cd node-v$version
prt-get isinst brotli && PKGMK_NODEJS+=' --shared-brotli'
prt-get isinst c-ares && PKGMK_NODEJS+=' --shared-cares'
prt-get isinst c-ares && patch -Rp1 -i $SRC/system-c-ares.patch
prt-get isinst icu && PKGMK_NODEJS+=' --with-intl=system-icu'
prt-get isinst nghttp2-libs && PKGMK_NODEJS+=' --experimental-http-parser --shared-nghttp2'
prt-get isinst ninja && PKGMK_NODEJS+=' --ninja'
./configure ${PKGMK_NODEJS} \
--prefix=/usr \
--enable-lto \
--without-npm \
--shared-libuv \
--shared-zlib \
--shared-openssl
make
make DESTDIR=$PKG install
rm -r $PKG/usr/share/doc
# clean up
find $PKG -type f \( \
-name 'README.md' -o \
-name 'AUTHORS.md' -o \
-name 'INSTALL.md' -o \
-name 'TODO.org' -o \
-name 'ChangeLog' -o \
-name 'NEWS' \) -delete
}