Skip to content

Building from source

Lucca Greschner edited this page Jul 14, 2023 · 9 revisions

Building

Note: Building is only supported on linux. Other systems are considered unsupported and the build process is not guaranteed to work!

Build dependencies

The following packages are needed for building.

  • Go 1.19 or 1.20
  • make
  • libpam
  • yarn

The remaining dependencies are automatically installed by go. Thus, an active internet connection is needed to build the project reliably.

Installing dependencies

Fedora 37 and newer

sudo dnf install golang make pam-devel

Ubuntu 23.04 LTS and (most) derivatives

sudo apt update
sudo apt install golang make libpam0g-dev npm
npm install --global yarn

Debian 11 (Bullseye)

1. apt update
sudo apt update
2. Activate backports repositories

Add the following line to your /etc/apt/sources.list-file:

deb http://deb.debian.org/debian bullseye-backports main
3. Install go 1.19 (or 1.20) and other dependencies
sudo apt update
sudo apt install -t bullseye-backports golang-1.19
export PATH=$PATH:/usr/lib/go-1.19/bin
sudo apt install make libpam0g-dev npm
npm install --global yarn

Debian 12 (Bookworm)

1. apt update
sudo apt update

2. Install dependencies

sudo apt install golang-1.19 libpam0g-dev npm make
export PATH=$PATH:/usr/lib/go-1.19/bin
npm install --global yarn

Build project

To build the project run the following command in the project's root directory:

make build

To package the project you need to be running a Debian system and have dpkg-deb installed.

If you want to build the package, run:

make package/deb

You'll find the package in the package/deb folder.

The compiled binary can be found in the bin folder

Run project

When running the project without using the .deb package, make sure to create a valid config file and the plugins folder. Otherwise, the application will not start!