Skip to content

Instantly share code, notes, and snippets.

@dmcbane
Last active May 15, 2018 00:15
Show Gist options
  • Save dmcbane/d8cc1ed05ced1948097313fd316ed89a to your computer and use it in GitHub Desktop.
Save dmcbane/d8cc1ed05ced1948097313fd316ed89a to your computer and use it in GitHub Desktop.
Build and Install Guile 2.2 on Ubuntu 17.10
#! /usr/bin/env bash
# install prerequisits
sudo apt install build-essential binutils flex bison autoconf automake libtool pkg-config gettext texinfo gdb git libunistring-dev libgc-dev libgmp-dev libiconv-hook-dev libltdl-dev libffi-dev libreadline-dev
# optional
sudo apt install libmysqlclient-dev libsqlite3-dev libpq-dev
# clone the source repo
if [ ! -d ~/src ]; then
mkdir -p ~/src
fi
cd ~/src
git clone git://git.sv.gnu.org/guile.git
# create a branch for the release tag
cd guile
git branch branch2.2.3 v2.2.3
git checkout branch2.2.3
# configure and build
./autogen.sh --no-configure
./configure --prefix=/usr --disable-static --docdir=/usr/share/doc/guile-2.2.3
make && make html
makeinfo --plaintext -o doc/r5rs/r5rs.txt doc/r5rs/r5rs.texi
makeinfo --plaintext -o doc/ref/guile.txt doc/ref/guile.texi
./check-guile
# install
sudo make install && sudo make install-html
sudo mv /usr/lib/libguile-*-gdb.scm /usr/share/gdb/auto-load/usr/lib
sudo mv /usr/share/doc/guile-2.2.3/{guile.html,ref}
sudo mv /usr/share/doc/guile-2.2.3/r5rs{.html,}
find examples -name "Makefile*" -delete
sudo cp -vR examples /usr/share/doc/guile-2.2.3
for DIRNAME in r5rs ref; do
sudo install -v -m644 doc/${DIRNAME}/*.txt \
/usr/share/doc/guile-2.2.3/${DIRNAME}
done &&
unset DIRNAME
# cleanup
make clean
# optional guile-dbi build and install
cd ~/src
git clone https://github.com/eestrada/guile-dbi.git
cd guile-dbi/guile-dbi && ./autogen.sh --no-configure && mkdir build && cd build && ../configure --prefix=/usr && make && sudo make install
cd ~/src/guile-dbi/guile-dbd-mysql && ./autogen.sh --no-configure && mkdir build && cd build && ../configure --prefix=/usr && make && sudo make install
cd ~/src/guile-dbi/guile-dbd-postgresql && ./autogen.sh --no-configure && mkdir build && cd build && ../configure --prefix=/usr && make && sudo make install
cd ~/src/guile-dbi/guile-dbd-sqlite3 && ./autogen.sh --no-configure && mkdir build && cd build && ../configure --prefix=/usr && make && sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment