# Depends on: openssl python2 c-ares icu zlib libuv

description="Evented I/O for V8 JavaScript"
url="http://nodejs.org/"
packager="greg <greg@nutyx.org>"
contributors="Alienus, tnut"

name=node
alias=(nodejs node-js)
version=10.14.2

source=(https://nodejs.org/dist/v$version/node-v$version.tar.xz)

build() {

	cd node-v$version

	./configure \
		--prefix=/usr \
		--shared-cares \
		--shared-libuv \
		--without-npm \
		--shared-openssl \
		--shared-zlib \
		--with-intl=system-icu

	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

}
