-
Notifications
You must be signed in to change notification settings - Fork 11
Build
- ENABLE_GAMMA=1 (to enable gamma support)
- ENABLE_DPMS=1 (to enable dpms support)
- ENABLE_DDC=1 (to enable ddcutil support)
- ENABLE_SCREEN=1 (to enable screen emitted backlight computation support, X only)
- ENABLE_YOCTOLIGHT=1 (to enable YoctoLight ALS devices support)
- ENABLE_PIPEWIRE=1 (to enable Pipewire camera sensor). Technical preview.
- libsystemd >= 221 or elogind
- libudev or libeudev
- libmodule 5.x (module/module_easy.h, module/modules_easy.h, module/map.h)
- libjpeg-turbo (jpeglib.h)
- polkit-gobject-1
- dbus-1 (needed to let pkg-config find SESSION_BUS_DIR variable)
- cmake >= 3.5
- gcc or clang
- pkg-config
- libxrandr
- libx11
- libwayland
- libdrm
- wayland-scanner
- libxext
- libx11
- libwayland
- libdrm
- wayland-scanner
- libx11
- libwayland
- wayland-scanner
- ddcutil >= 0.9.5
- libusb1
- libpipewire-0.3
- shared objects from build libraries
- polkit
NOTE: Clightd is NOT API-compatible with libmodule master. Please use latest 5.x tag!
Install needed dependencies;
On Debian based distros:
$ sudo apt install build-essential pkg-config cmake libsystemd-dev libxrandr-dev libxext-dev policykit-1 libpolkit-gobject-1-dev libjpeg-dev libusb-dev libwayland-dev libdrm-dev libddcutil-dev libusb-1.0-0-dev libudev-dev
If libddcutil-dev
is missing, you need to manually build and install it from source to support external monitors.
On Fedora:
$ sudo dnf install @development-tools cmake systemd-devel libXrandr-devel libXext-devel polkit-devel libjpeg-turbo-devel libusb1-devel wayland-devel libdrm-devel ddcutil-lib dbus-devel
On OpenSuse:
$ sudo zypper install --type pattern devel_basis
$ sudo zypper install cmake systemd-devel libXrandr-devel libXext-devel polkit-devel libjpeg-turbo-devel libusb-1_0-devel wayland-devel libdrm-devel libddcutil3 dbus-1-devel
If ddcutil-lib
is missing, you need to manually build and install it from source to support external monitors.
Plus, you have to manually install libmodule and, where missing ddcutil from sources.
Then, to build clightd, you just need to issue a:
$ mkdir build
$ cd build
$ cmake \
-G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE="Release" \
-DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1 -DENABLE_YOCTOLIGHT=1 \
..
$ make
# make install
$ cpack -G RPM
And finally install generated RPM package.
$ cpack -G DEB
And finally install generated DEB package.
To uninstall Clightd, since CMake does not offer an uninstall
target, you can run:
xargs rm < install_manifest.txt
from within the build folder.
Relevant stackoverflow thread: https://stackoverflow.com/questions/41471620/cmake-support-make-uninstall.