### this file is sourced not run
PKGVER=16.13.1
PKGBUILD=1
PKGARCH=x86_64

# source: james 
TARBALL=node-v${PKGVER}-linux-x64.tar.xz # binary tarball
MD5SUM=0de30c36dbe90c997126bbc4e5c8a949
SRC_URL=https://nodejs.org/dist/v${PKGVER}/$TARBALL
BUNDLE=

SLACKREQ='openssl' # 
SLACKDESC="nodejs-bin: nodejs-bin $PKGVER (Javascript application server)
nodejs-bin: 
nodejs-bin: Node.js is a platform built on Chrome's JavaScript runtime for 
nodejs-bin: easily building fast, scalable network applications. Node.js uses an 
nodejs-bin: event-driven, non-blocking I/O model that makes it lightweight and 
nodejs-bin: efficient, perfect for data-intensive real-time applications that run 
nodejs-bin: across distributed devices.
nodejs-bin: 
nodejs-bin: This is a re-packaged official binary.
nodejs-bin: 
nodejs-bin: https://nodejs.org/
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	rm -rf /opt/node* &&
	mv /tmp/node-* /opt &&
	ln -s /opt/node-* /opt/node &&
		
	mkdir -p /etc/profile.d &&
	echo 'PATH=$PATH:/opt/node/bin' > /etc/profile.d/nodejs.sh &&
	chmod +x /etc/profile.d/nodejs.sh &&

	pkg_build_slackdesc
}
