aboutsummaryrefslogtreecommitdiffstats
path: root/main/nodejs/APKBUILD
blob: 599a168d409a5980e6c644cae0f0f63ab8c84074 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Eivind Uggedal <eivind@uggedal.com>
pkgname=nodejs
pkgver=4.2.6
pkgrel=1
pkgdesc='Evented I/O for V8 javascript'
url='http://nodejs.org/'
arch='all'
license='MIT'
# gold is needed for mksnapshot
makedepends="$depends_dev python openssl-dev zlib-dev libuv-dev
	linux-headers paxmark binutils-gold"
subpackages="$pkgname-dev $pkgname-doc"
source="http://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz
	issue-4221.patch"
_builddir="$srcdir"/node-v$pkgver

prepare() {
        local i
        cd "$_builddir"
        for i in $source; do
                case $i in
                *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
                esac
        done
}

build() {
        cd "$_builddir"
	[ "$CARCH" = "armhf" ] && local _FPU="--with-arm-fpu=vfpv3-d16"
	./configure --prefix=/usr \
		--shared-zlib \
		--shared-libuv \
		$_FPU \
		--shared-openssl \
		|| return 1
	# we need run mksnapshot at build time so paxmark it early
	make -C out mksnapshot BUILDTYPE=Release \
		&& paxmark -m out/Release/mksnapshot \
		&& make || return 1
}

package() {
	local d
        cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	# paxmark so JIT works
	paxmark -m "$pkgdir"/usr/bin/node || return 1

	cp -pr "$pkgdir"/usr/lib/node_modules/npm/man "$pkgdir"/usr/share || return 1
	for d in doc html man; do
		rm -r "$pkgdir"/usr/lib/node_modules/npm/$d || return 1
	done
}

md5sums="b1287c356e904954da7e0c6435ff9948  node-v4.2.6.tar.gz
d5e343fc9d1da1718ec15280b290b4a1  issue-4221.patch"
sha256sums="ea5e357db8817052b17496d607c719d809ed1383e8fcf7c8ffc5214e705aefdd  node-v4.2.6.tar.gz
4e241e38c96629a4d96b19c99bd9c82da86a766aa53a08f4b1bb3d90a7ec7eee  issue-4221.patch"
sha512sums="ef5f4779a47cdaad07a7d617b73ade208858685114a6117999b1f5350294eb02645ca677ab7a2cde31127a7cfb0e04bc2d3254626586f615ab8cd428639efa4d  node-v4.2.6.tar.gz
36f91895bb339e0e386b4c2da9bca7eb5051083761ff66a61483fcc76b75e76b5e1a405e56ab4b39e53e3ee47d9cac5b7d949c42c1e7d919ee279fe8505dc58e  issue-4221.patch"