Skip to content

Instantly share code, notes, and snippets.

@byplayer
Created September 10, 2018 09:12
Show Gist options
  • Save byplayer/a13b9afccc6e3e74cf2ec40c5f309e66 to your computer and use it in GitHub Desktop.
Save byplayer/a13b9afccc6e3e74cf2ec40c5f309e66 to your computer and use it in GitHub Desktop.
build_emacs
#!/bin/bash
set -e
# --- configuration ---
EMACS_VER=26.1
SRC_ROOT=http://ftp.jaist.ac.jp/pub/GNU/emacs/
BUILD_DIR=/usr/local/src
INSTALL_DIR=/opt/emacs
# --- /configuration ---
cd ${BUILD_DIR}
if [ ! -f emacs-${EMACS_VER}.tar.xz ] ; then
wget ${SRC_ROOT}/emacs-${EMACS_VER}.tar.xz
fi
if [ ! -f emacs-${EMACS_VER}.tar.xz.sig ] ; then
wget ${SRC_ROOT}/emacs-${EMACS_VER}.tar.xz.sig
fi
# TODO
# gpg --verify emacs-${EMACS_VER}.tar.xz.sig emacs-${EMACS_VER}.tar.xz
if [ -d emacs-${EMACS_VER} ] ; then
rm -r emacs-${EMACS_VER}
fi
tar xf emacs-${EMACS_VER}.tar.xz
pushd emacs-${EMACS_VER}
./configure --prefix=${INSTALL_DIR} --with-cairo --with-xwidgets --with-x-toolkit=gtk3
make
make info
make install
# pushd emacs-${EMACS_VER}
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment