Akonadi's build system uses cmake.

So to compile Akonadi first create a build dir

  mkdir build
  cd build

then run cmake:

  cmake ..

(a typical cmake option that is often used is: -DCMAKE_INSTALL_PREFIX=<prefix>)

cmake then presents a configuration summary. At this point you may
want to install missing dependencies (if you do, remove the CMakeCache.txt)
and run cmake again.

Finally build Akonadi:

  make

And install it (in most cases root privileges are required):

  make install

That's all :)

=== Build Options ===

The following options are available when running CMake:

* AKONADI_BUILD_TESTS (Default: TRUE): Build the Akonadi unit tests
* AKONADI_BUILD_QSQLITE (Default: TRUE): Build the SQLite backend
* KDE_INSTALL_USE_QT_SYS_PATHS (Default: FALSE): Useful for distributions.
  Once enabled, the qsqlite3 backend will be installed in the sqlbackends subdirectory of the default Qt plugins directory
  specified at Qt build time.
* DATABASE_BACKEND (Default: MYSQL, available: MYSQL, POSTGRES, SQLITE): Define which database driver to use by default. MYSQL
  is the default right now, SQLITE is recommended for most users.

=== Build Requirements ===

Required:

* CMake (https://cmake.org/) >= 3.16
* Qt5 >= 6.4.0 (http://qt.nokia.com/downloads)
* Shared-mime-info >= 1.3 (https://freedesktop.org/wiki/Software/shared-mime-info/)
* Xsltproc (http://xmlsoft.org/XSLT/downloads.html)

Optional:

* MySQL/MariaDB (https://www.mysql.com/) - Optional at build time. You can pass -DMYSQLD_EXECUTABLE=/path/to/mysqld when running CMake instead
* Postgresql (https://www.postgresql.org/) - Optional at build time. You can pass -DPOSTGRES_PATH=/path/to/pg_ctl when running CMake instead

=== Runtime Requirements ===

* SQLite if you plan to use the SQLite backend
* MySQL server >= 5.1.3 (or compatible replacements such as MariaDB) if you plan to use the MySQL backend
* a Postgresql server if you plan to use the Postgres backend
