-
Notifications
You must be signed in to change notification settings - Fork 11
Build
Federico Di Pierro edited this page Nov 21, 2021
·
27 revisions
- 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)
- libsystemd >= 221 (systemd/sd-bus.h) or elogind (elogind/sd-bus.h)
- libudev or libeudev (libudev.h)
- libmodule >= 5.0.0 (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 (X11/extensions/Xrandr.h)
- libx11 (X11/Xlib.h)
- libwayland (wayland-client.h)
- libdrm (xf86drm.h, xf86drmMode.h)
- wayland-scanner
- libxext (X11/extensions/Xext.h)
- libx11 (X11/Xlib.h)
- libwayland (wayland-client.h)
- libdrm (xf86drm.h, xf86drmMode.h)
- wayland-scanner
- libx11 (X11/Xlib.h)
- libwayland (wayland-client.h)
- wayland-scanner
- ddcutil >= 0.9.5 (ddcutil_c_api.h)
- libusb (libusb.h)
- shared objects from build libraries
- polkit
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 libdbus-1-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 libusb-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.