52 lines
1.5 KiB
Bash
52 lines
1.5 KiB
Bash
# Template file for 'atom'
|
|
pkgname=atom
|
|
version=1.11.2
|
|
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 <abc@pompel.me>"
|
|
license="MIT"
|
|
homepage="https://atom.io"
|
|
distfiles="https://github.com/$pkgname/$pkgname/archive/v$version.tar.gz"
|
|
checksum=b7c09d03d950b0a6aca82225f072d9005d5681887e3a7c466b0504bf64d7c5cd
|
|
|
|
only_for_archs="i686 x86_64"
|
|
|
|
pre_build() {
|
|
sed -i -e "/exception-reporting/d" \
|
|
-e "/metrics/d" package.json
|
|
sed -e "s/<%= description %>/$pkgdesc/" \
|
|
-e "s|<%= appName %>|Atom|"\
|
|
-e "s|<%= installDir %>/share/<%= appFileName %>|/usr/bin|"\
|
|
-e "s|<%= iconPath %>|atom|"\
|
|
resources/linux/atom.desktop.in > resources/linux/Atom.desktop
|
|
}
|
|
do_build() {
|
|
script/build || script/build # FIXME: bug with overlayfs, build twice to fix
|
|
}
|
|
|
|
do_install() {
|
|
vbin atom.sh atom
|
|
vinstall resources/linux/Atom.desktop 644 usr/share/applications atom.desktop
|
|
vinstall resources/app-icons/stable/png/1024.png 644 usr/share/pixmaps atom.png
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) targetarch=i386;;
|
|
x86_64*) targetarch=amd64;;
|
|
*) targetarch=$hostarch;;
|
|
esac
|
|
|
|
|
|
vmkdir usr/share/atom
|
|
ls -lah
|
|
vcopy out/atom-$version-$targetarch/* usr/share/atom
|
|
vlicense LICENSE.md
|
|
|
|
ln -s /usr/share/atom/resources/app/apm/node_modules/.bin/apm "$DESTDIR/usr/bin/apm"
|
|
|
|
# remove useless static libs
|
|
find ${DESTDIR} -type f -name \*.a -delete
|
|
}
|