]>
Commit | Line | Data |
---|---|---|
578a3803 JP |
1 | # TODO: |
2 | # - package user docs from build/Documentation | |
11e9e5bb JB |
3 | # |
4 | # Conditional build: | |
ef04d99c | 5 | %bcond_without gui # libinput-debug-gui |
1a316496 | 6 | %bcond_with gtk4 # build libinput-debug-gui with gtk4 |
f6d0d702 | 7 | %bcond_without libunwind # libunwind debugging support |
a370658f | 8 | %bcond_without doc # documentation |
d254b872 | 9 | %bcond_without tests # tests |
13fc90c9 | 10 | |
f6d0d702 JB |
11 | %ifnarch %{ix86} %{x8664} %{arm} hppa ia64 mips ppc ppc64 sh |
12 | %undefine with_libunwind | |
13 | %endif | |
b1a834ff | 14 | Summary: Input device library |
66c98b1b | 15 | Summary(pl.UTF-8): Biblioteka urządzeń wejściowych |
b1a834ff | 16 | Name: libinput |
014b8556 JP |
17 | Version: 1.19.1 |
18 | Release: 1 | |
b1a834ff | 19 | License: MIT |
66c98b1b | 20 | Group: Libraries |
c29a2c14 | 21 | Source0: https://www.freedesktop.org/software/libinput/%{name}-%{version}.tar.xz |
014b8556 | 22 | # Source0-md5: 5176f5b2806807df23c5e315bcbf6567 |
c29a2c14 | 23 | URL: https://www.freedesktop.org/wiki/Software/libinput/ |
332a61be | 24 | BuildRequires: check-devel >= 0.9.10 |
6258de66 JB |
25 | BuildRequires: libevdev-devel >= 1.3 |
26 | %{?with_libunwind:BuildRequires: libunwind-devel} | |
27 | BuildRequires: libwacom-devel >= 0.20 | |
1a316496 | 28 | BuildRequires: meson >= 0.49.0 |
6258de66 JB |
29 | BuildRequires: mtdev-devel >= 1.1.0 |
30 | BuildRequires: ninja >= 1.5 | |
31 | BuildRequires: pkgconfig | |
5143ab31 | 32 | BuildRequires: rpmbuild(macros) >= 1.752 |
cedab715 | 33 | BuildRequires: tar >= 1:1.22 |
6258de66 JB |
34 | BuildRequires: udev-devel |
35 | BuildRequires: valgrind | |
cedab715 | 36 | BuildRequires: xz |
a370658f MK |
37 | %if %{with gui} |
38 | BuildRequires: cairo-devel | |
39 | BuildRequires: glib2-devel >= 2.0 | |
1a316496 | 40 | %if %{with gtk4} |
7892c2ae | 41 | BuildRequires: gtk4-devel >= 4.0 |
1a316496 | 42 | %else |
407ae804 | 43 | BuildRequires: gtk+3-devel >= 3.20 |
a370658f | 44 | %endif |
1a316496 JP |
45 | BuildRequires: wayland-devel |
46 | BuildRequires: wayland-protocols | |
47 | BuildRequires: xorg-lib-libX11-devel | |
48 | %endif | |
aed38082 | 49 | %if %{with doc} |
407ae804 | 50 | BuildRequires: doxygen >= 1.8.3 |
bb392f52 | 51 | BuildRequires: graphviz >= 2.26.0 |
578a3803 JP |
52 | BuildRequires: python3-recommonmark |
53 | BuildRequires: python3-sphinx_rtd_theme | |
54 | BuildRequires: sphinx-pdg-3 | |
a370658f | 55 | %endif |
1a316496 | 56 | %if %{with gui} && %{without gtk4} |
7892c2ae | 57 | BuildConflicts: gtk4-devel |
1a316496 | 58 | %endif |
ef04d99c | 59 | Requires: libevdev >= 1.3 |
725df436 JB |
60 | Requires: libwacom >= 0.20 |
61 | Requires: mtdev >= 1.1.0 | |
66c98b1b | 62 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
b1a834ff AM |
63 | |
64 | %description | |
65 | libinput is a library that handles input devices for display servers | |
66 | and other applications that need to directly deal with input devices. | |
67 | ||
68 | It provides device detection, device handling, input device event | |
69 | processing and abstraction so minimize the amount of custom input code | |
70 | the user of libinput need to provide the common set of functionality | |
71 | that users expect. | |
72 | ||
66c98b1b JB |
73 | %description -l pl.UTF-8 |
74 | libinput to biblioteka obsługująca urządzenia wejściowe dla serwerów | |
75 | grafiki i innych aplikacji wymagających bezpośredniej obsługi urządzeń | |
76 | wejściowych. | |
77 | ||
78 | Biblioteka zapewnia wykrywanie urządzeń, obsługę urządzeń, | |
79 | przetwarzanie zdarzeń urządzeń wejściowych oraz abstrakcję, | |
80 | minimalizując ilość własnego kodu, który musi napisać użytkownik | |
81 | biblioteki, aby zapewnić oczekiwaną funkcjonalność. | |
82 | ||
ef04d99c JB |
83 | %package gui |
84 | Summary: Debugging GUI for libinput | |
85 | Summary(pl.UTF-8): Graficzny interfejs diagnostyczny do libinput | |
86 | Group: X11/Applications | |
87 | Requires: %{name} = %{version}-%{release} | |
1a316496 | 88 | %if %{with gtk4} |
7892c2ae | 89 | Requires: gtk4 >= 4.0 |
1a316496 | 90 | %else |
407ae804 | 91 | Requires: gtk+3 >= 3.20 |
1a316496 | 92 | %endif |
ef04d99c JB |
93 | |
94 | %description gui | |
95 | Debugging GUI for libinput. | |
96 | ||
97 | %description gui -l pl.UTF-8 | |
98 | Graficzny interfejs diagnostyczny do libinput. | |
99 | ||
66c98b1b JB |
100 | %package devel |
101 | Summary: Development files for libinput | |
102 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libinput | |
103 | Group: Development/Libraries | |
b1a834ff | 104 | Requires: %{name} = %{version}-%{release} |
66c98b1b JB |
105 | Requires: udev-devel |
106 | ||
107 | %description devel | |
108 | This package contains the header files for developing applications | |
109 | that use libinput. | |
110 | ||
111 | %description devel -l pl.UTF-8 | |
112 | Ten pakiet zawiera pliki nagłówkowe niezbędne do tworzenia aplikacji | |
113 | wykorzystujących bibliotekę libinput. | |
114 | ||
66c98b1b JB |
115 | %package apidocs |
116 | Summary: API documentation for libinput library | |
117 | Summary(pl.UTF-8): Dokumentacja API biblioteki libinput | |
118 | Group: Documentation | |
0ae83712 | 119 | BuildArch: noarch |
66c98b1b JB |
120 | |
121 | %description apidocs | |
122 | API documentation for libinput library. | |
123 | ||
124 | %description apidocs -l pl.UTF-8 | |
125 | Dokumentacja API biblioteki libinput. | |
b1a834ff | 126 | |
45341a09 JP |
127 | %package -n zsh-completion-%{name} |
128 | Summary: Zsh completion for libinput command | |
129 | Summary(pl.UTF-8): Dopełnianie parametrów w zsh dla polecenia libinput | |
130 | Group: Applications/Shells | |
131 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
132 | Requires: zsh | |
133 | ||
134 | %description -n zsh-completion-%{name} | |
135 | Zsh completion for libinput command. | |
136 | ||
137 | %description -n zsh-completion-%{name} -l pl.UTF-8 | |
138 | Dopełnianie parametrów w zsh dla polecenia libinput. | |
139 | ||
b1a834ff AM |
140 | %prep |
141 | %setup -q | |
142 | ||
6258de66 | 143 | %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \ |
73f60c09 | 144 | tools/libinput-analyze-{per-slot-delta,recording,touch-down-state}.py \ |
6258de66 | 145 | tools/libinput-measure-{fuzz,touchpad-pressure,touch-size,touchpad-tap}.py \ |
73f60c09 | 146 | tools/libinput-{replay,measure-touchpad-size}.py |
bc749beb | 147 | |
b1a834ff | 148 | %build |
11306b0c | 149 | %meson build \ |
2de91326 AM |
150 | -Ddebug-gui=%{__true_false gui} \ |
151 | -Ddocumentation=%{__true_false doc} \ | |
45341a09 JP |
152 | -Dudev-dir=/lib/udev \ |
153 | -Dzshcompletiondir=%{zsh_compdir} | |
b1a834ff | 154 | |
2ea47e4f JB |
155 | %ninja_build -C build |
156 | ||
157 | %{?with_tests:%ninja_test -C build} | |
b1a834ff AM |
158 | |
159 | %install | |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | ||
2ea47e4f | 162 | %ninja_install -C build |
66c98b1b | 163 | |
a3a0a290 JB |
164 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/libinput-test-suite.1 |
165 | ||
b1a834ff AM |
166 | %clean |
167 | rm -rf $RPM_BUILD_ROOT | |
168 | ||
66c98b1b JB |
169 | %post -p /sbin/ldconfig |
170 | %postun -p /sbin/ldconfig | |
b1a834ff AM |
171 | |
172 | %files | |
173 | %defattr(644,root,root,755) | |
ef04d99c JB |
174 | %doc COPYING README.md |
175 | %attr(755,root,root) %{_bindir}/libinput | |
66c98b1b | 176 | %attr(755,root,root) %{_libdir}/libinput.so.*.*.* |
3bf5286f | 177 | %attr(755,root,root) %ghost %{_libdir}/libinput.so.10 |
ef04d99c | 178 | %dir %{_libexecdir}/libinput |
f15e23dc JP |
179 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze |
180 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-per-slot-delta | |
73f60c09 JP |
181 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-recording |
182 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-touch-down-state | |
ef04d99c | 183 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-events |
7001c1ee | 184 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-tablet |
ef04d99c JB |
185 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-list-devices |
186 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure | |
9a19d5af | 187 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-fuzz |
d254b872 | 188 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-pressure |
f15e23dc | 189 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-size |
ef04d99c | 190 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-tap |
d254b872 | 191 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touch-size |
578a3803 | 192 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-quirks |
9a19d5af JP |
193 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-record |
194 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-replay | |
76cc7e64 | 195 | %attr(755,root,root) /lib/udev/libinput-device-group |
7001c1ee JP |
196 | %attr(755,root,root) /lib/udev/libinput-fuzz-extract |
197 | %attr(755,root,root) /lib/udev/libinput-fuzz-to-zero | |
76cc7e64 | 198 | /lib/udev/rules.d/80-libinput-device-groups.rules |
ad4e8b69 | 199 | /lib/udev/rules.d/90-libinput-fuzz-override.rules |
578a3803 JP |
200 | %dir %{_datadir}/libinput |
201 | %{_datadir}/libinput/*.quirks | |
ef04d99c | 202 | %{_mandir}/man1/libinput.1* |
f15e23dc JP |
203 | %{_mandir}/man1/libinput-analyze.1* |
204 | %{_mandir}/man1/libinput-analyze-per-slot-delta.1* | |
73f60c09 JP |
205 | %{_mandir}/man1/libinput-analyze-recording.1* |
206 | %{_mandir}/man1/libinput-analyze-touch-down-state.1* | |
cf0d28df | 207 | %{_mandir}/man1/libinput-debug-events.1* |
7001c1ee | 208 | %{_mandir}/man1/libinput-debug-tablet.1* |
1573a790 | 209 | %{_mandir}/man1/libinput-list-devices.1* |
ef04d99c | 210 | %{_mandir}/man1/libinput-measure.1* |
9a19d5af | 211 | %{_mandir}/man1/libinput-measure-fuzz.1* |
d254b872 | 212 | %{_mandir}/man1/libinput-measure-touchpad-pressure.1* |
f15e23dc | 213 | %{_mandir}/man1/libinput-measure-touchpad-size.1* |
ef04d99c | 214 | %{_mandir}/man1/libinput-measure-touchpad-tap.1* |
d254b872 | 215 | %{_mandir}/man1/libinput-measure-touch-size.1* |
578a3803 JP |
216 | %{_mandir}/man1/libinput-quirks.1* |
217 | %{_mandir}/man1/libinput-quirks-list.1* | |
218 | %{_mandir}/man1/libinput-quirks-validate.1* | |
9a19d5af JP |
219 | %{_mandir}/man1/libinput-record.1* |
220 | %{_mandir}/man1/libinput-replay.1* | |
ef04d99c JB |
221 | |
222 | %if %{with gui} | |
223 | %files gui | |
224 | %defattr(644,root,root,755) | |
225 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-gui | |
226 | %{_mandir}/man1/libinput-debug-gui.1* | |
227 | %endif | |
b1a834ff AM |
228 | |
229 | %files devel | |
230 | %defattr(644,root,root,755) | |
b1a834ff | 231 | %attr(755,root,root) %{_libdir}/libinput.so |
66c98b1b | 232 | %{_includedir}/libinput.h |
b1a834ff | 233 | %{_pkgconfigdir}/libinput.pc |
66c98b1b | 234 | |
aed38082 | 235 | %if %{with doc} |
66c98b1b JB |
236 | %files apidocs |
237 | %defattr(644,root,root,755) | |
3a91b81a | 238 | %doc build/doc/html/* |
aed38082 | 239 | %endif |
45341a09 JP |
240 | |
241 | %files -n zsh-completion-%{name} | |
242 | %defattr(644,root,root,755) | |
243 | %{zsh_compdir}/_libinput |