PKGBUILDs/community/nodejs/PKGBUILD

73 lines
2.2 KiB
Bash
Raw Normal View History

2014-09-28 13:07:04 +00:00
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
2012-01-27 02:19:01 +00:00
# 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>
2017-11-15 03:04:37 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - set config and gyp flags
buildarch=28
2012-01-27 02:19:01 +00:00
pkgname=nodejs
2021-10-13 00:51:07 +00:00
pkgver=16.11.1
2021-04-25 16:28:10 +00:00
pkgrel=1
2012-01-27 02:19:01 +00:00
pkgdesc='Evented I/O for V8 javascript'
2017-11-17 23:43:21 +00:00
arch=('x86_64')
2019-08-24 16:55:30 +00:00
url='https://nodejs.org/'
2012-01-27 02:19:01 +00:00
license=('MIT')
2021-06-03 18:33:32 +00:00
depends=('openssl' 'zlib' 'icu' 'libuv' 'libnghttp2' 'c-ares') # 'http-parser' 'v8')
2019-12-30 22:23:21 +00:00
makedepends=('python' 'procps-ng')
2015-05-08 12:43:59 +00:00
optdepends=('npm: nodejs package manager')
2021-08-11 19:08:35 +00:00
source=("https://github.com/nodejs/node/archive/v$pkgver/nodejs-$pkgver.tar.gz"
system-c-ares.patch)
2021-10-13 00:51:07 +00:00
sha512sums=('d508a408b9d783db34f70e67b4c4fa9cb04b84caa0f397086c4691b15b159c0c5d2aa7a33c403f7ac82fb3c23f867c7aaa5f4f9d85f5c5e8b95bda29e0ce8247'
2021-08-11 19:08:35 +00:00
'bca85b5a4622b38f20f3787bdb2784db76cd4b213fadf8a5813a375080e7481c4aff7556712d59df3e19849a7eb6b2f048a69b4e2162cb717ab1b3a791d2558e')
prepare() {
patch -d node-$pkgver -Rp1 < system-c-ares.patch
}
2015-04-04 04:39:00 +00:00
2013-05-15 14:33:50 +00:00
build() {
2017-04-24 19:11:39 +00:00
cd node-$pkgver
2012-01-27 02:19:01 +00:00
2017-11-15 03:04:37 +00:00
[[ "$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"
2012-02-05 02:06:11 +00:00
2012-01-27 02:19:01 +00:00
./configure \
--prefix=/usr \
2015-05-08 12:43:59 +00:00
--with-intl=system-icu \
--without-npm \
2015-02-15 19:15:29 +00:00
--shared-openssl \
2015-09-17 01:10:51 +00:00
--shared-zlib \
2015-10-13 12:11:28 +00:00
--shared-libuv \
2018-12-09 19:39:23 +00:00
--experimental-http-parser \
2018-03-13 00:02:36 +00:00
--shared-nghttp2 \
2021-06-03 18:33:32 +00:00
--shared-cares \
2015-09-17 01:10:51 +00:00
${CONFIG}
2020-10-25 23:27:52 +00:00
# --shared-cares \
2017-11-15 03:04:37 +00:00
# --shared-v8
2018-12-09 19:39:23 +00:00
# --shared-http-parser
2012-01-27 02:19:01 +00:00
2015-04-04 04:39:00 +00:00
make
2012-01-27 02:19:01 +00:00
}
check() {
2017-04-24 19:11:39 +00:00
cd node-$pkgver
2020-10-25 23:27:52 +00:00
make test || :
2012-01-27 02:19:01 +00:00
}
package() {
2017-04-24 19:11:39 +00:00
cd node-$pkgver
2012-01-27 02:19:01 +00:00
2017-11-15 03:04:37 +00:00
make DESTDIR="$pkgdir" install
2012-01-27 02:19:01 +00:00
install -D -m644 LICENSE \
2017-11-15 03:04:37 +00:00
"$pkgdir"/usr/share/licenses/nodejs/LICENSE
2012-01-27 02:19:01 +00:00
}
# vim:set ts=2 sw=2 et: