Skip to content

Compiling and Installing

Gaute Hope edited this page Aug 13, 2022 · 13 revisions

astroid uses cmake for building, also you might need git for the build process to work properly. Both should be available in most distributions. We recommend using the ninja backend over make, but you can chose.

A fairly recent version of GTK+ and glib with their C++ bindings are also required, along with boost, gmime and a compiler that supports C++11. And lastly, but importantly, the notmuch libraries are also required.

compiling

$ cmake -H. -Bbuild -GNinja # to use the ninja backend
$ cd build && ninja

to run the tests do:

$ cd build && ninja test

installing

Configure with a prefix and install:

$ cmake -H. -Bbuild -GNinja -DCMAKE_INSTALL_PREFIX=/usr
$ cmake --build build 
$ sudo ninja -C build install

this will install the astroid binary into /usr/bin/ and data files into /usr/share/astroid/. You can use $DESTDIR to specify an install root.

uninstalling

No automatic way of uninstalling is provided with the build system (use your package manager for that). However, here are two solutions:

Install using stow
$ git clone https://github.com/astroidmail/astroid.git
$ cd astroid
$ cmake -H. -Bbuild -GNinja -DCMAKE_INSTALL_PREFIX=/usr/local/stow/astroid
$ cmake --build build 
$ sudo ninja -C build install
$ cd /usr/local/stow
$ sudo stow astroid
Uninstall using stow
$ cd /usr/local/stow
$ sudo stow -D astroid
$ sudo rm -fr astroid

Distribution specific information

Clone this wiki locally