-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-emacs.sh
executable file
·40 lines (32 loc) · 959 Bytes
/
build-emacs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS and newer
# version: 24.5
# Toolkit: lucid
set -eu
readonly version="24.5"
# install dependencies
sudo apt-get -qq update
sudo apt-get -qq install -y stow build-essential libx11-dev xaw3dg-dev \
libjpeg-dev libpng12-dev libgif-dev libtiff5-dev libncurses5-dev \
libxft-dev librsvg2-dev libmagickcore-dev libmagick++-dev \
libxml2-dev libgpm-dev libotf-dev libm17n-dev \
libgnutls-dev wget
# 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
# build and install
sudo mkdir -p /usr/local/stow
cd emacs-"$version"
./configure \
--with-xft \
--with-x-toolkit=lucid
make
sudo make \
install-arch-dep \
install-arch-indep \
prefix=/usr/local/stow/emacs-"$version"
cd /usr/local/stow
sudo stow emacs-"$version"