atom: use nvm in install phase

This commit is contained in:
Andrea Brancaleoni 2015-09-19 19:19:46 +02:00
parent ce1b06cd3d
commit 311d4bb337

View File

@ -12,19 +12,21 @@ license="MIT"
homepage="https://atom.io"
distfiles="https://github.com/$pkgname/$pkgname/archive/v$version.tar.gz"
checksum=13e29e10fcbdad3a1427959ec94246d564b7741a5bdf77d5839f7d25a8c131e7
_NODE_VERSION=0.12.7
pre_build() {
local NODE_VERSION=0.12.7
local NVM_VERSION=0.26.1
curl -o- https://raw.githubusercontent.com/creationix/nvm/v$NVM_VERSION/install.sh | bash
source ~/.nvm/nvm.sh
nvm install $NODE_VERSION
nvm use $NODE_VERSION
nvm install $_NODE_VERSION
nvm use $_NODE_VERSION
}
do_build() {
script/build
}
do_install() {
source ~/.nvm/nvm.sh
nvm use $_NODE_VERSION
script/grunt install --install-dir ${DESTDIR}/usr
sed -i "s|${DESTDIR}||g" ${DESTDIR}/usr/share/applications/atom.desktop
vlicense LICENSE.md