Provide make targets and build configuration to create a shared object for other systems/applications to use to control keyboard LEDs without the need for instantiating the g810-led process. Provide make targets for installing library and development files into environments, such as the current system or package builders. Currently preserves precious behavior of building g810-led binary as statically linked. Provides an alternative build target of "bin-linked" which will create a dynamically linked variant. Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>
2.0 KiB
Installation :
Build dependencies :
- git
- g++
- make
Dependencies :
- hidapi or libusb
hidapi vs libusb :
hidapi is a newer implementation but needs more testing.
hidapi is more responsive than libusb (~20ms vs ~150ms).
hidapi seem not work on CentOS, writing on hidraw is not allowed.
hidapi is recommended but if you encounter problem on your system, switch to libusb.
Installation by repos :
ArchLinux (aur) :
yaourt -S g810-led-git
# with yaourt
pacaur -S g810-led-git
# with pacaur
Installation of dependencies :
ArchLinux :
sudo pacman -S git gcc make hidapi
# for hidapi
sudo pacman -S git gcc make libusb
# for libusb
Debian :
sudo apt-get install git g++ make libhidapi-dev
# for hidapi
sudo apt-get install git g++ make libusb-1.0-0-dev
# for libusb
Fedora :
sudo dnf install git make gcc-c++ hidapi-devel
# for hidapi
sudo dnf install git make gcc-c++ libusbx-devel
# for libusb
Installation :
git clone https://github.com/MatMoul/g810-led.git
cd g810-led
make
# for hidapi
make LIB=libusb
# for libusb
sudo make install
make install-lib
to install the libg810-led library.
make install-dev
to install the libg810-led library and headers for development.
Building the library :
The library is built by default when running the make
(default target "all").
To specifically build the library as a standalone component:
make lib
Update :
Same as install, but your profile and reboot files are preserved.
Uninstall :
sudo make uninstall
Boot profiles :
If your system use systemd, g810-led has 2 systemd units (g810-led and g810-led-reboot).
These 2 units set the keyboard profile on boot and reboot.
Profiles are stored in /etc/g810-led :
- /etc/g810-led/profile
- /etc/g810-led/reboot
Samples can be found in /etc/g810-led/samples.