PKGBUILDs/community/nodejs/PKGBUILD
2021-12-20 03:56:42 +00:00

68 lines
2 KiB
Bash

# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: James Campos <james.r.campos@gmail.com>
# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >
# Contributor: Dongsheng Cai <dongsheng at moodle dot com>
# Contributor: Masutu Subric <masutu.arch at googlemail dot com>
# Contributor: TIanyi Cui <tianyicui@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - set config and gyp flags
buildarch=28
pkgname=nodejs
pkgver=17.3.0
pkgrel=1
pkgdesc='Evented I/O for V8 javascript'
arch=('x86_64')
url='https://nodejs.org/'
license=('MIT')
depends=('brotli' 'openssl' 'zlib' 'icu' 'libuv' 'libnghttp2' 'c-ares') # 'http-parser' 'v8')
makedepends=('python' 'procps-ng')
optdepends=('npm: nodejs package manager')
source=("https://github.com/nodejs/node/archive/v$pkgver/nodejs-$pkgver.tar.gz")
sha512sums=('fbfc347c0f07df1d575b27f660abda97b65f336577797ba56a8837385ddb5fc6d55bf80c95042ff74ad9f4bd12e5188672b8f307a085287db89e1b9fdaba2567')
build() {
cd node-$pkgver
[[ "$CARCH" == "armv6h" ]] && export CONFIG="--with-arm-float-abi=hard --with-arm-fpu=vfp" && export GYPFLAGS="-Darm_thumb -Darm_float_abi=hard -Darm_version=6 -Darm_fpu=vfpv2"
[[ "$CARCH" == "armv7h" ]] && export CONFIG="--with-arm-float-abi=hard --with-arm-fpu=vfpv3-d16" && export GYPFLAGS="-Darm_thumb -Darm_float_abi=hard -Darm_version=7 -Darm_fpu=vfpv3-d16"
./configure \
--prefix=/usr \
--with-intl=system-icu \
--without-npm \
--shared-openssl \
--shared-zlib \
--shared-libuv \
--experimental-http-parser \
--shared-nghttp2 \
--shared-cares \
--shared-brotli \
${CONFIG}
# --shared-cares \
# --shared-v8
# --shared-http-parser
make
}
check() {
cd node-$pkgver
make test || :
}
package() {
cd node-$pkgver
make DESTDIR="$pkgdir" install
install -D -m644 LICENSE \
"$pkgdir"/usr/share/licenses/nodejs/LICENSE
}
# vim:set ts=2 sw=2 et: