atom: build with nvm

This commit is contained in:
Andrea Brancaleoni 2015-09-19 18:50:55 +02:00
parent aa439e1e53
commit 53de5bcd04

View File

@ -1,10 +1,10 @@
# Template file for 'atom'
pkgname=atom
version=1.0.13
revision=1
revision=2
nocross=yes
nostrip=yes
hostmakedepends="git nodejs pkg-config python-devel"
hostmakedepends="git pkg-config python-devel curl"
makedepends="python-devel GConf-devel libgnome-keyring-devel"
short_desc="Chrome-based text editor from Github"
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
@ -12,14 +12,22 @@ license="MIT"
homepage="https://atom.io"
distfiles="https://github.com/$pkgname/$pkgname/archive/v$version.tar.gz"
checksum=13e29e10fcbdad3a1427959ec94246d564b7741a5bdf77d5839f7d25a8c131e7
broken="https://github.com/atom/atom/issues/8508 can't build with nodejs >= 4"
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
}
do_build() {
script/build
}
do_install() {
script/grunt install --install-dir ${DESTDIR}/usr
sed -i "s|${DESTDIR}||g" ${DESTDIR}/usr/share/applications/atom.desktop
vlicense LICENSE.md
# remove useless static libs
find ${DESTDIR} -type f -name \*.a -delete
}