-
Notifications
You must be signed in to change notification settings - Fork 27
Build
Federico edited this page Jul 11, 2019
·
50 revisions
Please note that at least on Ubuntu and Fedora, -devel packages are splitted from their main package. You'll need them.
Remember to install your distro devel packages too, eg: build-essential
on Ubuntu or base-devel
on arch.
- libsystemd >= 221 (systemd/sd-bus.h) or elogind (elogind/sd-bus.h)
- libpopt (popt.h)
- gsl (gsl/gsl_multifit.h, gsl/gsl_statistics_double.h)
- libconfig (libconfig.h)
- gcc or clang
- cmake >= 3.5
- pkg-config
- dbus-1 (needed to let pkg-config find SESSION_BUS_DIR variable)
- bash-completion (needed only if you wish to have a bash completion script for clight)
- libsystemd
- libpopt
- gsl
- libconfig
- clightd >= 2.0
- Geoclue2 to automatically retrieve user location (no geoclue and no user position specified will disable GAMMA support)
- Upower to honor timeouts between captures, to use different ambient brightness -> screen backlight matching coefficients, to change dimmer timeout and to change dpms timeouts depending on ac state.
It is also used to add support for keyboard backlight.
To build clight, after installing proper dependencies, 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" \
..
$ make
# make install
$ cpack -G RPM
And finally install generated RPM package.
$ cpack -G DEB
And finally install generated DEB package.
That's it.
As Clight does depend upon Clightd and Clightd in turn depends upon libmodule, user brianread108 developed a tiny build script that automatically manages all dependencies:
#!/bin/sh
echo "Building Clight and its dependencies..."
echo "* Getting Sources from git "
git clone https://github.com/FedeDP/Clight.git
git clone https://github.com/FedeDP/Clightd.git
git clone https://github.com/FedeDP/libmodule.git
git clone https://github.com/rockowitz/ddcutil.git
cd ddcutil
echo "* Building ddcutil"
./autogen.sh
./configure --prefix=/usr
make
sudo make install
cd ..
cd libmodule
echo "* Building Libmodule"
mkdir build
cd build
cmake ../
make
sudo make install
cd ../..
cd Clightd
echo "* Building clightd"
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_IDLE=1 -DENABLE_DPMS=1 \
..
make
sudo make install
cd ../..
cd Clight
echo "* Building clight"
mkdir build
cd build
cmake \
-G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE="Release" \
..
make
sudo make install
echo "Done...Enjoy Clight!"