/** @page building_libinput libinput build instructions @tableofcontents Instructions on how to build libinput and its tools and how to build against libinput. The build instruction on this page detail how to overwrite your system-provided libinput with one from the git repository, see see @ref reverting_install to revert to the previous state. @section building Building libinput libinput uses [meson](https://www.mesonbuild.com) and [ninja](https://www.ninja-build.org). A build is usually the three-step process below. A successful build requires the @ref building_dependencies to be installed before running meson. @code $> git clone git://anongit.freedesktop.org/git/wayland/libinput $> cd libinput $> meson --prefix=/usr builddir/ $> ninja -C builddir/ $> sudo ninja -C builddir/ install $> sudo udevadm hwdb --update @endcode The ```prefix``` option or other options can be changed later with the ```mesonconf``` command. @code $> mesonconf builddir/ -Dprefix=/some/other/prefix $> ninja -C builddir $> sudo ninja -C builddir/ install @endcode @note On Fedora, you may need to use ```ninja-build``` instead of ```ninja```. See [this bug](https://bugzilla.redhat.com/show_bug.cgi?id=1166135) @subsection building_autotools Building with automake libinput currently also provides the autotools build system, but this will be removed in future libinput versions. A build with automake is usually the three-step process below. A successful build requires the @ref building_dependencies to be installed at configure time. @code $> git clone git://anongit.freedesktop.org/git/wayland/libinput $> cd libinput $> ./autogen.sh --prefix=/usr --libdir=/usr/lib64 $> make $> sudo make install $> sudo udevadm hwdb --update @endcode @note On Debian-based distributions including Ubuntu and its derivatives skip the ```--libdir=/usr/lib64``` argument. @subsection verifying_install Verifying the install To verify the install worked correctly, check that libinput.so.x.x.x is in the library path and that all symlinks point to the new library.
$> ls -l /usr/lib64/libinput.* -rwxr-xr-x 1 root root 946 Apr 28 2015 /usr/lib64/libinput.la lrwxrwxrwx 1 root root 19 Feb 1 15:12 /usr/lib64/libinput.so -> libinput.so.10.11.2 lrwxrwxrwx 1 root root 19 Feb 1 15:12 /usr/lib64/libinput.so.10 -> libinput.so.10.11.2 -rwxr-xr-x 1 root root 204992 Feb 1 15:12 /usr/lib64/libinput.so.10.11.2The .so installed from git master may have a lower number than the system-provided one. In that case, manually adjust the symlinks to point to the newly installed .so.x.x.x @subsection reverting_install Reverting to the system-provided libinput packge The recommended way to revert to the system install is to use the package manager to reinstall the libinput package. In some cases, this may leave files in the system (e.g. ```/usr/lib/libinput.la```) but these files are usually harmless. To definitely remove all files, run the following command from the libinput source directory: @code $> sudo ninja -C builddir/ uninstall @endcode or when using autotools: @code $> sudo make uninstall # WARNING: Do not restart the computer/X/the Wayland compositor after make # uninstall, reinstall the system package immediately! @endcode The following commands reinstall the current system package for libinput, overwriting manually installed files.
$> sudo zypper modifyrepo --enable `zypper repos | grep source | awk '{print $5}'`
$> sudo zypper source-install -d libinput10
$> sudo zypper install autoconf automake libtool
$> sudo zypper modifyrepo --disable `zypper repos | grep source | awk '{print $5}'`
$> abs extra/libinput $> cd $(mktemp -d) $> cp /var/abs/extra/libinput/PKGBUILD . $> makepkg --syncdeps --nobuild