Installing notmuch and muchsync on uberspace
Because I want to use notmuch for my mails and also sync tags between my machines, I figured I should install notmuch and muchsync on my uberspace. But because centos7 does not have packages and uberspace does not yet provide a way to conveniently install packages for a user, I had to compile the world.
Here's the guide for doing it.
Preface
In the following steps, I will download, unpack and build sources from scratch.
My download and compile folder will be at $HOME/compile
.
My install folder will be at $HOME/install
. I don't be installing stuff into
my $HOME directly on the uberspace, because I want to be a bit organized here.
Thus, you might want to adapt your commandline calls.
Obtaining sources
First, you should go and fetch all latest sources for the whole dependency chain. I will not link to the individual tarballs, you should figure out the links for yourself to get the latest and greatest of each project.
Here's the list of links where you'll find the code you'll need to compile:
- https://www.samba.org/ftp/talloc/
- https://xapian.org/download
- https://notmuchmail.org/releases/
- http://www.muchsync.org/src/
- https://download.gnome.org/sources/gmime/3.2/ (because github release tags or gitlab release tags do not contain ./configure (thanks to gnome developers thinking it might not be necessary to actually include their build toolchain in the repository), you'll need to use this link).
- https://gnupg.org/ftp/gcrypt/libksba/
- https://www.gnupg.org/download/index.html (gpgme, libgpg-error, libassuan, npth, ntbtls, gnupg)
Configuring the build(s) and building
First of all, execute
mkdir -p $HOME/install/lib/pkgconfig
export PKG_CONFIG_PATH=$HOME/install/lib/pkgconfig/:$PKG_CONFIG_PATH
To make sure the pkg-config utility finds the right package configuration files.
It follows a list of configure calls for the respectice library/binary. I hope this list is complete and I didn't miss anything in the process. Feel free to mail-ping me if something is missing.
For all packages that are not listed here, a simple
./configure --prefix=$HOME/install && make install
did the job. For the following packages, it was not as convenient, but after
successfully configuring, you can install all of them with a simple make
install
.
libassuan
./configure --prefix=$HOME/install \
--with-libgpg-error-prefix=$HOME/install/
gpgme
./configure --prefix=$HOME/install \
--with-libgpg-error-prefix=$HOME/install \
--with-libassuan-prefix=$HOME/install
libksba
./configure --prefix=$HOME/install \
--with-libgpg-error-prefix=$HOME/install
gmime
PATH=$HOME/install/bin:$PATH ./configure --prefix=$HOME/install
libgcrypt
./configure --prefix=$HOME/install \
--with-libgpg-error-prefix=$HOME/install
ntbtls
./configure --prefix=$HOME/install \
--with-libgpg-error-prefix=$HOME/install \
--with-libgcrypt-prefix=$HOME/install \
--with-ksba-prefix=$HOME/install
gnupg
./configure --prefix=$HOME/install \
--with-libgpg-error-prefix=$HOME/install \
--with-libgcrypt-prefix=$HOME/install \
--with-libassuan-prefix=$HOME/install \
--with-ksba-prefix=$HOME/install
notmuch
You might want to open a new shell for the environment variables
export LD_LIBRARY_PATH=$HOME/install/lib:$LD_LIBRARY_PATH PATH=$HOME/install/bin:$PATH
export LDFLAGS="$LDFLAGS -L$HOME/install/lib/ "
export CFLAGS="$CFLAGS -I$HOME/install/include/ -std=c99 "
export PKG_CONFIG_PATH=$HOME/install/lib/pkgconfig:$PKG_CONFIG_PATH
./configure --prefix=$HOME/install \
--without-bash-completion \
--without-docs \
--without-api-docs \
--without-emacs \
--without-desktop \
--without-ruby \
--without-zsh-completion
muchsync
You might want to open a new shell for the environment variables
export LDFLAGS="$LDFLAGS -L$HOME/install/lib/ -Wl,-rpath,$HOME/install/lib/"
export LD_LIBRARY_PATH=$HOME/install/lib:$LD_LIBRARY_PATH
export CXXFLAGS="$CXXFLAGS -I$HOME/install/include "
export PKG_CONFIG_PATH=$HOME/install/lib/pkgconfig
./configure --prefix=$HOME/install --exec-prefix=$HOME/install
List of versions this guide was written for
This is the (alphabetically sorted) list of stuff I had to compile and install, including versions so you can figure whether you have something newer and might need to investigate on differences when compiling your stuff:
- gmime-3.2.7
- gnupg-2.2.21
- gpgme-1.14.0
- libassuan-2.5.3
- libgcrypt-1.8.6
- libgpg-error-1.38
- libksba-1.4.0
- muchsync-5
- notmuch-0.30
- npth-1.6
- ntbtls-0.1.2
- talloc-2.3.1
- xapian-core-1.4.16
Of course you should update your installation if new versions come out.
Happy compiling.
tags: #uberspace #email #linux