Skip to content

1. Build and install

John edited this page Mar 9, 2024 · 26 revisions

Installing dependencies

Building ebusd from the source requires the following packages and/or features on your build system:

  • autoconf (>=2.63), automake (>=1.11)
  • or alternatively: cmake (>=3.7.1) g++ with C++11 support (>=4.8.1)
  • make
  • kernel with pselect or ppoll support
  • glibc with getopt_long support
  • libmosquitto-dev for MQTT support
  • libssl-dev for SSL support

Install required packages on Debian

dpkg install git autoconf automake g++ make libssl-dev

Install required packages on Ubuntu

apt install git autoconf automake g++ make

Install required packages on Arch Linux

pacman -S git autoconf automake gcc make

Install required packages on Alpine Linux

apk add build-base git cmake

Install required packages on Mac OS X

brew install automake autoconf

Install required packages on Cygwin

Use the setup.exe provided by cygwin and add the following packages if not already installed:

  • autoconf and automake, or only cmake
  • gcc-g++
  • libstdc++6 (should also be automatically picked by the previous)

Adding MQTT support

For MQTT support also add libmosquitto-dev.

Adding knxd support

For using KNX via knxd TCP connection, also add knxd-dev.

Get the source

For the time being, ebusd is only available on git. If you have git installed, simply type:

git clone https://github.com/john30/ebusd.git
cd ebusd

Configuration

Configuration with autoconf

In order to build ebusd with autoconf, you can use the autogen.sh script as described below.

The default destination of the compiled ebusd binary is /usr/bin/ebusd. If that's fine for you, simply type:

./autogen.sh

If you prefer having the ebusd binary in another directory, you have to adjust the prefix, e.g. like this:

./autogen.sh --prefix=/usr/local

In case you want to get a debuggable version of the binaries, you can simply change the environment variable CXXFLAGS before invoking ./autogen.sh (actually ./configure), e.g.:

CXXFLAGS="-g -O0 -ggdb" ./autogen.sh

Configuration with cmake

In order to build ebusd with cmake, just generate the Makefiles with this call:

cmake .

Compilation

To compile the source, simply type:

make

After that, you can run ebusd already and get the command line help like this:

./src/ebusd/ebusd --help

Installation

To install the binaries on the local machine, type:

make install-strip

Start automatically

To start ebusd automatically on Debian based systems use one of these commands:

On systemd enabled systems:

sudo systemctl enable ebusd
sudo service ebusd start

On SystemV systems:

sudo update-rc.d ebusd defaults
sudo update-rc.d ebusd enable
sudo /etc/init.d/ebusd start

For daemon mode, on Debian based systems the ebusd command line options are configured in the file /etc/default/ebusd.

Clone this wiki locally