-
Notifications
You must be signed in to change notification settings - Fork 189
Building
To clone the git repository use:
git clone https://github.com/linuxwacom/libwacom.git
Released versions of libwacom are available here: https://github.com/linuxwacom/libwacom/releases
Peter Hutterer is the current libwacom maintainer.
Please do not send email regarding bugs or feature requests to the maintainer. Use the issue tracker instead.
Before building from git with you need to install the dependencies:
On Ubuntu:
First open the "Software & Updates" program and ensure the "Source code" box is enabled in the "Ubuntu Software" tab. Close the window and tell it to reload the software list if prompted. Next, install the dependencies by running:
sudo apt-get install build-essential && sudo apt-get build-dep libwacom
On Fedora or CentOS:
sudo dnf builddep libwacom pytest
pip install libevdev
On other distributions:
Check the CI script for a list of build dependencies. Package names are usually similar across distributions, install those packages with your package manager and then proceed to build libwacom itself.
libwacom currently supports autotools and the more modern meson build system. We recommend building with meson but it doesn't really matter which one of the two you pick.
Meson requires a build directory to be specified, here we use builddir. This directory can be removed at any time, it merely contains all the build artifacts. Navigate into the libwacom source directory and run the following commands:
meson builddir --prefix=/usr
ninja -C builddir
sudo ninja -C builddir install
To re-build simply run the ninja commands above. Removing the builddir is safe but you'll have to run meson to re-generate it.
To uninstall, run sudo ninja -C builddir uninstall and re-install the distribution-provided libwacom package to ensure all files are in place.
autotools support has been removed in git master and only works for libwacom versions pre 2.0
Depending on your system, you may find it necessary to use this procedure instead of the meson instructions above. Navigate into the libwacom source directory and run the following commands:
On Fedora, RHEL, CentOS, etc:
./autogen.sh --prefix=/usr --libdir=/lib64
make
sudo make install
On Ubuntu, Debian, Mint, etc:
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu/
make
sudo make install
On Arch, Manjaro, etc:
./autogen.sh --prefix=/usr
make
sudo make install
If you run into the following error, install the libtool package through your packaging manager.
Makefile.am: error: Libtool library used but 'LIBTOOL' is undefined
Makefile.am: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
Makefile.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
Makefile.am: If 'LT_INIT' is in 'configure.ac', make sure
Makefile.am: its definition is in aclocal's search path.
To uninstall, run sudo make uninstall and re-install the distribution-provided libwacom package to ensure all files are in place.
During make install, the data files are installed into the supplied prefix, usually /usr/share/libwacom. If data files have already been installed by a distribution-supplied package with a different name, there may be duplicates that prevent libwacom from working properly. To check if duplicates exist and are causing problems, run the following and ensure it does not print out an error about a "duplicate match":
libwacom-list-local-devices
If a duplicate match is found, you will need to read the Troubleshooting article's section on duplicate matches.
For local testing of new data files, you can just copy the data file(s) directly into the directory and check for duplicates as described above.
sudo cp -r /home/<path>/libwacom/data/* /usr/share/libwacom/