libinput
on Alpine Linux
Get the sources:
git clone git://anongit.freedesktop.org/git/wayland/libinput
Dependencies
libinput
requires the following packages to be installed:
- libudev
- mtdev
- libevdev
and the following libraries are optional:
- libwacom
- doxygen (for documentation)
Look in meson_options.txt
for more detail on these.
apk add eudev eudev-dev mtdev mtdev-dev libevdev libevdev-dev
Run the configure script
libinput
requires the meson build system which is built on Python and uses ninja
to compile the sources. If python 3.5 (or above) and meson are not already installed
you should do that now.
apk add meson
Configure then compile the sources:
meson . build -Dlibwacom=false -Ddocumentation=false -Ddebug-gui=false
cd build
ninja
This should be successful, I am using version libinput 1.10.900 and it is working well on Alpine Linux.
See some debug output
There are some rules files for udev
/ eudev
in the build directory that should
be installed on your system. They begin with 80- and 90-. These files can be copied
manually to /lib/udev/rules.d
and /lib/udev/hwdb.d
or you can install with ninja.
I recommend manually as we did not configure the prefix for meson and by default
the prefix is /usr/local
.
When the rules are installed udev can add the devices to the libinput database (or whatever libinput uses to enumerate devices) and use them :-). Naturally just copying the files did not actually do anything... next fire up udev and trigger the events from the kernel:
/etc/init.d/udev start
udevadm trigger
Now you can see the keypresses and mouse movements:
./libinput-debug-events
Excellent!