Skip to content

Instantly share code, notes, and snippets.

@biocyberman
Forked from favadi/build-emacs.sh
Last active July 26, 2019 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biocyberman/6fb2196bb85bda680f22 to your computer and use it in GitHub Desktop.
Save biocyberman/6fb2196bb85bda680f22 to your computer and use it in GitHub Desktop.
Compile latest emacs version in Ubuntu Precise, Trusty ...
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Tested on Ubuntu 12.04 LTS onward
# version: 25.1
# Toolkit: lucid
set -e
readonly version="26.2"
# install dependencies
sudo apt-get install -y stow
sudo apt-get build-dep emacs25
# Change to emacs23, emacs25 or any version available on your current Ubuntu.
# download source package
if [[ ! -d emacs-"$version" ]]; then
wget http://ftp.gnu.org/gnu/emacs/emacs-"$version".tar.xz
tar xvf emacs-"$version".tar.xz
fi
# buil and install
cd emacs-"$version"
./configure \
--with-xft \
--with-x-toolkit=lucid
make -j4
sudo make install prefix=/usr/local/stow/emacs-"$version"
cd /usr/local/stow
sudo stow emacs-"$version"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment