From 522cb184fb21a7981fd6875de085a813257279ff Mon Sep 17 00:00:00 2001 From: Luca Ferrari Date: Mon, 4 Nov 2024 15:48:26 +0100 Subject: [PATCH] [#480] Adds DISTRIBUTIONS.md file Adds instrunctions to install the required dependencies in order to compile from sources. So far, there are commands for Rocky Linux and FreeBSD. Close #480 --- README.md | 37 ++++---------------------------- doc/DISTRIBUTIONS.md | 51 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 33 deletions(-) create mode 100644 doc/DISTRIBUTIONS.md diff --git a/README.md b/README.md index 240bf82c..9f9000f9 100644 --- a/README.md +++ b/README.md @@ -54,42 +54,13 @@ See [Architecture](./doc/ARCHITECTURE.md) for the architecture of [**pgagroal**] * [FreeBSD](https://www.freebsd.org/) * [OpenBSD](http://www.openbsd.org/) -## Compiling the source -[**pgagroal**](https://github.com/agroal/pgagroal) requires +## Compiling from sources -* [gcc 8+](https://gcc.gnu.org) (C17) -* [cmake](https://cmake.org) -* [make](https://www.gnu.org/software/make/) -* [libev](http://software.schmorp.de/pkg/libev.html) -* [OpenSSL](http://www.openssl.org/) -* [systemd](https://www.freedesktop.org/wiki/Software/systemd/) -* [rst2man](https://docutils.sourceforge.io/) -* [libatomic](https://gcc.gnu.org/wiki/Atomic) -* [cJSON](https://github.com/DaveGamble/cJSON) +[**pgagroal**](https://github.com/agroal/pgagroal) can be compiled from sources, +after having installed all the required dependencies. +See the [documentation about installing the required dependencies](doc/DISTRIBUTIONS.md). -On Rocky Linux (and similar) operating systems, the dependencies -can be installed via `dnf(8)` as follows: - -```sh -dnf install git gcc cmake make \ - libev libev-devel \ - openssl openssl-devel \ - systemd systemd-devel \ - python3-docutils \ - libatomic \ - cjson cjson-devel -``` - -Please note that, on Rocky Linux, in order to install the `python3-docutils` -package (that provides `rst2man` executable), you need to enable the `crb` repository: - -```sh -dnf config-manager --set-enabled crb -``` - - -Alternatively to GCC, [clang 8+](https://clang.llvm.org/) can be used. ### Release build diff --git a/doc/DISTRIBUTIONS.md b/doc/DISTRIBUTIONS.md new file mode 100644 index 00000000..a3c27f8d --- /dev/null +++ b/doc/DISTRIBUTIONS.md @@ -0,0 +1,51 @@ +# Compiling `pgagroal` from sources + +[**pgagroal**](https://github.com/agroal/pgagroal) requires the following dependencies: + +* a C compiler liker [gcc 8+](https://gcc.gnu.org) (C17) or [clang 8+](https://clang.llvm.org/) +* [cmake](https://cmake.org) +* [GNU make](https://www.gnu.org/software/make/) or BSD `make` +* [libev](http://software.schmorp.de/pkg/libev.html) +* [OpenSSL](http://www.openssl.org/) +* [rst2man](https://docutils.sourceforge.io/) +* [libatomic](https://gcc.gnu.org/wiki/Atomic) +* [cJSON](https://github.com/DaveGamble/cJSON) +* [Doxygen](https://doxygen.nl/index.html) +* [pdflatex](https://tug.org/texlive/) +* on Linux platforms, there is also the need for + * [systemd](https://www.freedesktop.org/wiki/Software/systemd/) + + + +## Compiling on Rocky Linux + +All the dependencies can be installed via `dnf(8)` as follows: + +```sh +dnf install git gcc cmake make \ + libev libev-devel \ + openssl openssl-devel \ + systemd systemd-devel \ + python3-docutils \ + libatomic \ + cjson cjson-devel +``` + +Please note that, on Rocky Linux, in order to install the `python3-docutils` +package (that provides `rst2man` executable), you need to enable the `crb` repository: + +```sh +dnf config-manager --set-enabled crb +``` + +## Compiling on FreeBSD + +All the dependencies can be installed via `pkg(8)` as follows: + +```sh +pkg install cmake \ + libev libevent \ + py311-docutils \ + libcjson \ + texlive-formats \ +```