Atom

From Sabayon Wiki
Jump to: navigation, search

Atom is a free text editor being developed by GitHub. On Sabayon there are two ways to install Atom: using Portage and manually from source code.

Installation

Using Portage

Note: the commands in this section must be performed as root user. To enter root run su.

To install Atom using Portage one must add a Portage overlay containing an Atom package, for a list of such overlays go here. Then once one has found a suitable overlay add it using layman (using layman -a <overlay_name> where <overlay_name> should be replaced with the overlay's name) and install it using emerge -a app-editors/atom. It may be worthwhile installing as many dependencies as possible using Entropy, however. Here is a command that should install many (but perhaps not all) dependencies of this package using Entropy:

equo install dev-lang/python:2.7 dev-libs/nss dev-libs/nspr dev-util/ninja gnome-base/gconf gnome-base/libgnome-keyring media-fonts/inconsolata media-libs/alsa-lib net-libs/nodejs net-print/cups sys-devel/llvm sys-libs/libcap sys-libs/ncurses x11-libs/gtk+:2 x11-libs/libnotify x11-libs/libXtst x11-libs/pango

Manual installation

For further information see the official Linux build instructions for Atom.

Installing Atom manually involves three major steps:

  • Installing the dependencies. This can be done using either Entropy or Portage, or a combination of the two. To install using Entropy run:
sudo equo install dev-lang/python:2.7 dev-vcs/git gnome-base/gconf gnome-base/libgnome-keyring net-libs/nodejs sys-devel/gcc
  • Getting the source code. Usually done via Git, but this uses more hard disk drive space and takes longer than downloading the source code in the form of tar archives. But if this is done using these tar archives, instead of using Git it can make updating the installation, when new releases become available, more difficult. To get the source code with git run:
git clone https://github.com/atom/atom
git remote add upstream https://github.com/atom/atom.git #this step is only required if you wish to update your installation in the future
git fetch -p
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)

Alternatively the tarball of the source code can be obtained via wget. The following code gets the source code via this method and then extracts it into the ~/atom directory.

ver=1.0.7 #this is the version number of Atom being installed. 
wget -c https://github.com/atom/atom/archive/v$ver.tar.gz
tar -xzf v$ver.tar.gz
mv atom-$ver atom
  • Building and installing Atom. This step usually takes over an hour, but most of it is automated, requiring minimal user input. This step consists of running:
script/build
sudo script/grunt install

External links