2 # - package user docs from build/Documentation
5 %bcond_without gui # libinput-debug-gui
6 %bcond_with gtk4 # build libinput-debug-gui with gtk4
7 %bcond_without libunwind # libunwind debugging support
8 %bcond_without doc # documentation
9 %bcond_without tests # tests
11 %ifnarch %{ix86} %{x8664} %{arm} hppa ia64 mips ppc ppc64 sh
12 %undefine with_libunwind
14 Summary: Input device library
15 Summary(pl.UTF-8): Biblioteka urządzeń wejściowych
21 Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/%{name}-%{version}.tar.bz2
22 # Source0-md5: 0b1646e48bead2ac110f2a3a6fb09317
23 URL: https://www.freedesktop.org/wiki/Software/libinput/
24 BuildRequires: check-devel >= 0.9.10
25 BuildRequires: libevdev-devel >= 1.3
26 %{?with_libunwind:BuildRequires: libunwind-devel}
27 BuildRequires: libwacom-devel >= 0.20
28 BuildRequires: meson >= 0.49.0
29 BuildRequires: mtdev-devel >= 1.1.0
30 BuildRequires: ninja >= 1.5
31 BuildRequires: pkgconfig
32 BuildRequires: rpm-build >= 4.6
33 BuildRequires: rpmbuild(macros) >= 1.752
34 BuildRequires: sed >= 4.0
35 BuildRequires: tar >= 1:1.22
36 BuildRequires: udev-devel
37 BuildRequires: valgrind
40 BuildRequires: cairo-devel
41 BuildRequires: glib2-devel >= 2.0
43 BuildRequires: gtk4-devel >= 4.0
45 BuildRequires: gtk+3-devel >= 3.20
47 BuildRequires: wayland-devel
48 BuildRequires: wayland-protocols
49 BuildRequires: xorg-lib-libX11-devel
52 BuildRequires: doxygen >= 1.8.3
53 BuildRequires: graphviz >= 2.26.0
54 BuildRequires: python3-recommonmark
55 BuildRequires: python3-sphinx_rtd_theme
56 BuildRequires: sphinx-pdg-3
58 Requires: libevdev >= 1.3
59 Requires: libwacom >= 0.20
60 Requires: mtdev >= 1.1.0
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 libinput is a library that handles input devices for display servers
65 and other applications that need to directly deal with input devices.
67 It provides device detection, device handling, input device event
68 processing and abstraction so minimize the amount of custom input code
69 the user of libinput need to provide the common set of functionality
72 %description -l pl.UTF-8
73 libinput to biblioteka obsługująca urządzenia wejściowe dla serwerów
74 grafiki i innych aplikacji wymagających bezpośredniej obsługi urządzeń
77 Biblioteka zapewnia wykrywanie urządzeń, obsługę urządzeń,
78 przetwarzanie zdarzeń urządzeń wejściowych oraz abstrakcję,
79 minimalizując ilość własnego kodu, który musi napisać użytkownik
80 biblioteki, aby zapewnić oczekiwaną funkcjonalność.
83 Summary: Debugging GUI for libinput
84 Summary(pl.UTF-8): Graficzny interfejs diagnostyczny do libinput
85 Group: X11/Applications
86 Requires: %{name} = %{version}-%{release}
90 Requires: gtk+3 >= 3.20
94 Debugging GUI for libinput.
96 %description gui -l pl.UTF-8
97 Graficzny interfejs diagnostyczny do libinput.
100 Summary: Development files for libinput
101 Summary(pl.UTF-8): Pliki programistyczne biblioteki libinput
102 Group: Development/Libraries
103 Requires: %{name} = %{version}-%{release}
107 This package contains the header files for developing applications
110 %description devel -l pl.UTF-8
111 Ten pakiet zawiera pliki nagłówkowe niezbędne do tworzenia aplikacji
112 wykorzystujących bibliotekę libinput.
115 Summary: API documentation for libinput library
116 Summary(pl.UTF-8): Dokumentacja API biblioteki libinput
121 API documentation for libinput library.
123 %description apidocs -l pl.UTF-8
124 Dokumentacja API biblioteki libinput.
126 %package -n zsh-completion-%{name}
127 Summary: Zsh completion for libinput command
128 Summary(pl.UTF-8): Dopełnianie parametrów w zsh dla polecenia libinput
129 Group: Applications/Shells
130 Requires: %{name} = %{epoch}:%{version}-%{release}
133 %description -n zsh-completion-%{name}
134 Zsh completion for libinput command.
136 %description -n zsh-completion-%{name} -l pl.UTF-8
137 Dopełnianie parametrów w zsh dla polecenia libinput.
142 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
143 tools/libinput-analyze-{per-slot-delta,recording,touch-down-state}.py \
144 tools/libinput-measure-{fuzz,touchpad-pressure,touch-size,touchpad-tap}.py \
145 tools/libinput-{replay,measure-touchpad-size}.py
148 %{__sed} -i -e "/dependency('gtk4'/ s/'gtk4'/'gtk4-disabled'/" meson.build
153 -Ddebug-gui=%{__true_false gui} \
154 -Ddocumentation=%{__true_false doc} \
155 -Dudev-dir=/lib/udev \
156 -Dzshcompletiondir=%{zsh_compdir}
158 %ninja_build -C build
160 %{?with_tests:%ninja_test -C build}
163 rm -rf $RPM_BUILD_ROOT
165 %ninja_install -C build
167 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/libinput-test-suite.1
170 rm -rf $RPM_BUILD_ROOT
172 %post -p /sbin/ldconfig
173 %postun -p /sbin/ldconfig
176 %defattr(644,root,root,755)
177 %doc COPYING README.md
178 %attr(755,root,root) %{_bindir}/libinput
179 %attr(755,root,root) %{_libdir}/libinput.so.*.*.*
180 %attr(755,root,root) %ghost %{_libdir}/libinput.so.10
181 %dir %{_libexecdir}/libinput
182 %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze
183 %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-per-slot-delta
184 %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-recording
185 %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-touch-down-state
186 %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-events
187 %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-tablet
188 %attr(755,root,root) %{_libexecdir}/libinput/libinput-list-devices
189 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure
190 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-fuzz
191 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-pressure
192 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-size
193 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-tap
194 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touch-size
195 %attr(755,root,root) %{_libexecdir}/libinput/libinput-quirks
196 %attr(755,root,root) %{_libexecdir}/libinput/libinput-record
197 %attr(755,root,root) %{_libexecdir}/libinput/libinput-replay
198 %attr(755,root,root) /lib/udev/libinput-device-group
199 %attr(755,root,root) /lib/udev/libinput-fuzz-extract
200 %attr(755,root,root) /lib/udev/libinput-fuzz-to-zero
201 /lib/udev/rules.d/80-libinput-device-groups.rules
202 /lib/udev/rules.d/90-libinput-fuzz-override.rules
203 %dir %{_datadir}/libinput
204 %{_datadir}/libinput/*.quirks
205 %{_mandir}/man1/libinput.1*
206 %{_mandir}/man1/libinput-analyze.1*
207 %{_mandir}/man1/libinput-analyze-per-slot-delta.1*
208 %{_mandir}/man1/libinput-analyze-recording.1*
209 %{_mandir}/man1/libinput-analyze-touch-down-state.1*
210 %{_mandir}/man1/libinput-debug-events.1*
211 %{_mandir}/man1/libinput-debug-tablet.1*
212 %{_mandir}/man1/libinput-list-devices.1*
213 %{_mandir}/man1/libinput-measure.1*
214 %{_mandir}/man1/libinput-measure-fuzz.1*
215 %{_mandir}/man1/libinput-measure-touchpad-pressure.1*
216 %{_mandir}/man1/libinput-measure-touchpad-size.1*
217 %{_mandir}/man1/libinput-measure-touchpad-tap.1*
218 %{_mandir}/man1/libinput-measure-touch-size.1*
219 %{_mandir}/man1/libinput-quirks.1*
220 %{_mandir}/man1/libinput-quirks-list.1*
221 %{_mandir}/man1/libinput-quirks-validate.1*
222 %{_mandir}/man1/libinput-record.1*
223 %{_mandir}/man1/libinput-replay.1*
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-gui
229 %{_mandir}/man1/libinput-debug-gui.1*
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_libdir}/libinput.so
235 %{_includedir}/libinput.h
236 %{_pkgconfigdir}/libinput.pc
240 %defattr(644,root,root,755)
241 %doc build/doc/html/*
244 %files -n zsh-completion-%{name}
245 %defattr(644,root,root,755)
246 %{zsh_compdir}/_libinput