Depedencies:
sudo apt install autoconf autoconf-archive libglib2.0-dev libgudev-1.0-dev libtool pkg-config
# for Python bindings
sudo apt install python3-build python3-dev python3-pip python3-venv
Configure it:
systemdsystemunitdir=/usr/local/lib/systemd/system ./autogen.sh --enable-tools --enable-bindings-python --enable-dbus --enable-systemd
Setting systemdsystemunitdir environment variable prevents the systemd unit from being installed in /usr/lib/systed/system which is supposed to be reserved for packaged software.
--enable-systemd will build and install the systemd service file.
--enable-dbus is needed to build and install the dbus service.
Other options are up to you.
sudo make install does not do everyhing, so there are some extra steps:
-
Create
gpio-manageruser orgpiogroups.sudo addgroup --system gpio sudo adduser --system gpio-manager --ingroup gpio sudo usermod -aG gpio $USER newgrp gpio # or start a new login shell -
Install D-Bus conf in
/etcsudo ln -s /usr/local/etc/dbus-1/system.d/io.gpiod1.conf /etc/dbus-1/system.d/ -
Fix prefix in systemd service.
Works aroud issue: brgl/libgpiod#173
sudo systemctl edit gpio-manager.service[Service] ExecStart= ExecStart=/usr/local/bin/gpio-manager -
Trigger library
sudo ldconfig -
Trigger udev rule
udevadm trigger -s gpio -
Enable and start systemd service
If it fails, it is probably becaues of permission error. Steps above have to be done first.
sudo systemctl enable gpio-manager.service sudo systemctl start gpio-manager.service