#
# Conditional build:
%bcond_without gui # libinput-debug-gui
+%bcond_with gtk4 # build libinput-debug-gui with gtk4
%bcond_without libunwind # libunwind debugging support
%bcond_without doc # documentation
%bcond_without tests # tests
Summary: Input device library
Summary(pl.UTF-8): Biblioteka urządzeń wejściowych
Name: libinput
-Version: 1.16.4
+Version: 1.19.1
Release: 1
License: MIT
Group: Libraries
Source0: https://www.freedesktop.org/software/libinput/%{name}-%{version}.tar.xz
-# Source0-md5: 1fdc670e62a08bcebceabd23af3d639a
+# Source0-md5: 5176f5b2806807df23c5e315bcbf6567
URL: https://www.freedesktop.org/wiki/Software/libinput/
BuildRequires: check-devel >= 0.9.10
BuildRequires: libevdev-devel >= 1.3
%{?with_libunwind:BuildRequires: libunwind-devel}
BuildRequires: libwacom-devel >= 0.20
-BuildRequires: meson >= 0.45.0
+BuildRequires: meson >= 0.49.0
BuildRequires: mtdev-devel >= 1.1.0
BuildRequires: ninja >= 1.5
BuildRequires: pkgconfig
-BuildRequires: rpmbuild(macros) >= 1.736
+BuildRequires: rpmbuild(macros) >= 1.752
+BuildRequires: tar >= 1:1.22
BuildRequires: udev-devel
BuildRequires: valgrind
+BuildRequires: xz
%if %{with gui}
BuildRequires: cairo-devel
BuildRequires: glib2-devel >= 2.0
+%if %{with gtk4}
+BuildRequires: gtk4-devel >= 4.0
+%else
BuildRequires: gtk+3-devel >= 3.20
%endif
+BuildRequires: wayland-devel
+BuildRequires: wayland-protocols
+BuildRequires: xorg-lib-libX11-devel
+%endif
%if %{with doc}
BuildRequires: doxygen >= 1.8.3
BuildRequires: graphviz >= 2.26.0
BuildRequires: python3-sphinx_rtd_theme
BuildRequires: sphinx-pdg-3
%endif
+%if %{with gui} && %{without gtk4}
+BuildConflicts: gtk4-devel
+%endif
Requires: libevdev >= 1.3
Requires: libwacom >= 0.20
Requires: mtdev >= 1.1.0
Summary(pl.UTF-8): Graficzny interfejs diagnostyczny do libinput
Group: X11/Applications
Requires: %{name} = %{version}-%{release}
+%if %{with gtk4}
+Requires: gtk4 >= 4.0
+%else
Requires: gtk+3 >= 3.20
+%endif
%description gui
Debugging GUI for libinput.
Summary: API documentation for libinput library
Summary(pl.UTF-8): Dokumentacja API biblioteki libinput
Group: Documentation
-%if "%{_rpmversion}" >= "4.6"
BuildArch: noarch
-%endif
%description apidocs
API documentation for libinput library.
%setup -q
%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
+ tools/libinput-analyze-{per-slot-delta,recording,touch-down-state}.py \
tools/libinput-measure-{fuzz,touchpad-pressure,touch-size,touchpad-tap}.py \
- tools/libinput-{replay,analyze-per-slot-delta.py,measure-touchpad-size.py}
+ tools/libinput-{replay,measure-touchpad-size}.py
%build
%meson build \
%dir %{_libexecdir}/libinput
%attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze
%attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-per-slot-delta
+%attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-recording
+%attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-touch-down-state
%attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-events
%attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-tablet
%attr(755,root,root) %{_libexecdir}/libinput/libinput-list-devices
%{_mandir}/man1/libinput.1*
%{_mandir}/man1/libinput-analyze.1*
%{_mandir}/man1/libinput-analyze-per-slot-delta.1*
+%{_mandir}/man1/libinput-analyze-recording.1*
+%{_mandir}/man1/libinput-analyze-touch-down-state.1*
%{_mandir}/man1/libinput-debug-events.1*
%{_mandir}/man1/libinput-debug-tablet.1*
%{_mandir}/man1/libinput-list-devices.1*
%if %{with doc}
%files apidocs
%defattr(644,root,root,755)
-%doc build/api/*
+%doc build/doc/html/*
%endif
%files -n zsh-completion-%{name}