# Template file for 'atom'
pkgname=atom
version=1.7.4
revision=1
nocross=yes
nostrip=yes
hostmakedepends="git pkg-config python-devel nodejs git-perl"
makedepends="python-devel GConf-devel libgnome-keyring-devel"
short_desc="Chrome-based text editor from Github"
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
license="MIT"
homepage="https://atom.io"
distfiles="https://github.com/$pkgname/$pkgname/archive/v$version.tar.gz"
checksum=6ef3bb4c2fea85a7d1c7665fef8aac4e353c8f8da5e2878fea3aecf5437383d4

only_for_archs="i686 x86_64"
broken="https://build.voidlinux.eu/builders/x86_64_builder/builds/23755/steps/shell_3/logs/stdio"

do_build() {
	sed -i -e "/exception-reporting/d" \
		-e "/metrics/d" package.json
	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
}
