]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - package user docs from build/Documentation | |
3 | # | |
4 | # Conditional build: | |
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 | |
10 | ||
11 | %ifnarch %{ix86} %{x8664} %{arm} hppa ia64 mips ppc ppc64 sh | |
12 | %undefine with_libunwind | |
13 | %endif | |
14 | Summary: Input device library | |
15 | Summary(pl.UTF-8): Biblioteka urządzeń wejściowych | |
16 | Name: libinput | |
17 | Version: 1.21.0 | |
18 | Release: 1 | |
19 | License: MIT | |
20 | Group: Libraries | |
21 | Source0: https://gitlab.freedesktop.org/libinput/libinput/-/archive/%{version}/%{name}-%{version}.tar.bz2 | |
22 | # Source0-md5: 3b5aaea6ebe1902dec089174b24ad2b3 | |
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 | |
38 | BuildRequires: xz | |
39 | %if %{with gui} | |
40 | BuildRequires: cairo-devel | |
41 | BuildRequires: glib2-devel >= 2.0 | |
42 | %if %{with gtk4} | |
43 | BuildRequires: gtk4-devel >= 4.0 | |
44 | %else | |
45 | BuildRequires: gtk+3-devel >= 3.20 | |
46 | %endif | |
47 | BuildRequires: wayland-devel | |
48 | BuildRequires: wayland-protocols | |
49 | BuildRequires: xorg-lib-libX11-devel | |
50 | %endif | |
51 | %if %{with doc} | |
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 | |
57 | %endif | |
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) | |
62 | ||
63 | %description | |
64 | libinput is a library that handles input devices for display servers | |
65 | and other applications that need to directly deal with input devices. | |
66 | ||
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 | |
70 | that users expect. | |
71 | ||
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ń | |
75 | wejściowych. | |
76 | ||
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ść. | |
81 | ||
82 | %package gui | |
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} | |
87 | %if %{with gtk4} | |
88 | Requires: gtk4 >= 4.0 | |
89 | %else | |
90 | Requires: gtk+3 >= 3.20 | |
91 | %endif | |
92 | ||
93 | %description gui | |
94 | Debugging GUI for libinput. | |
95 | ||
96 | %description gui -l pl.UTF-8 | |
97 | Graficzny interfejs diagnostyczny do libinput. | |
98 | ||
99 | %package devel | |
100 | Summary: Development files for libinput | |
101 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libinput | |
102 | Group: Development/Libraries | |
103 | Requires: %{name} = %{version}-%{release} | |
104 | Requires: udev-devel | |
105 | ||
106 | %description devel | |
107 | This package contains the header files for developing applications | |
108 | that use libinput. | |
109 | ||
110 | %description devel -l pl.UTF-8 | |
111 | Ten pakiet zawiera pliki nagłówkowe niezbędne do tworzenia aplikacji | |
112 | wykorzystujących bibliotekę libinput. | |
113 | ||
114 | %package apidocs | |
115 | Summary: API documentation for libinput library | |
116 | Summary(pl.UTF-8): Dokumentacja API biblioteki libinput | |
117 | Group: Documentation | |
118 | BuildArch: noarch | |
119 | ||
120 | %description apidocs | |
121 | API documentation for libinput library. | |
122 | ||
123 | %description apidocs -l pl.UTF-8 | |
124 | Dokumentacja API biblioteki libinput. | |
125 | ||
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} | |
131 | Requires: zsh | |
132 | ||
133 | %description -n zsh-completion-%{name} | |
134 | Zsh completion for libinput command. | |
135 | ||
136 | %description -n zsh-completion-%{name} -l pl.UTF-8 | |
137 | Dopełnianie parametrów w zsh dla polecenia libinput. | |
138 | ||
139 | %prep | |
140 | %setup -q | |
141 | ||
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 | |
146 | ||
147 | %if %{without gtk4} | |
148 | %{__sed} -i -e "/dependency('gtk4'/ s/'gtk4'/'gtk4-disabled'/" meson.build | |
149 | %endif | |
150 | ||
151 | %build | |
152 | %meson build \ | |
153 | -Ddebug-gui=%{__true_false gui} \ | |
154 | -Ddocumentation=%{__true_false doc} \ | |
155 | -Dudev-dir=/lib/udev \ | |
156 | -Dzshcompletiondir=%{zsh_compdir} | |
157 | ||
158 | %ninja_build -C build | |
159 | ||
160 | %{?with_tests:%ninja_test -C build} | |
161 | ||
162 | %install | |
163 | rm -rf $RPM_BUILD_ROOT | |
164 | ||
165 | %ninja_install -C build | |
166 | ||
167 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/libinput-test-suite.1 | |
168 | ||
169 | %clean | |
170 | rm -rf $RPM_BUILD_ROOT | |
171 | ||
172 | %post -p /sbin/ldconfig | |
173 | %postun -p /sbin/ldconfig | |
174 | ||
175 | %files | |
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) %{_libexecdir}/libinput/libinput-test | |
199 | %attr(755,root,root) /lib/udev/libinput-device-group | |
200 | %attr(755,root,root) /lib/udev/libinput-fuzz-extract | |
201 | %attr(755,root,root) /lib/udev/libinput-fuzz-to-zero | |
202 | /lib/udev/rules.d/80-libinput-device-groups.rules | |
203 | /lib/udev/rules.d/90-libinput-fuzz-override.rules | |
204 | %dir %{_datadir}/libinput | |
205 | %{_datadir}/libinput/*.quirks | |
206 | %{_mandir}/man1/libinput.1* | |
207 | %{_mandir}/man1/libinput-analyze.1* | |
208 | %{_mandir}/man1/libinput-analyze-per-slot-delta.1* | |
209 | %{_mandir}/man1/libinput-analyze-recording.1* | |
210 | %{_mandir}/man1/libinput-analyze-touch-down-state.1* | |
211 | %{_mandir}/man1/libinput-debug-events.1* | |
212 | %{_mandir}/man1/libinput-debug-tablet.1* | |
213 | %{_mandir}/man1/libinput-list-devices.1* | |
214 | %{_mandir}/man1/libinput-measure.1* | |
215 | %{_mandir}/man1/libinput-measure-fuzz.1* | |
216 | %{_mandir}/man1/libinput-measure-touchpad-pressure.1* | |
217 | %{_mandir}/man1/libinput-measure-touchpad-size.1* | |
218 | %{_mandir}/man1/libinput-measure-touchpad-tap.1* | |
219 | %{_mandir}/man1/libinput-measure-touch-size.1* | |
220 | %{_mandir}/man1/libinput-quirks.1* | |
221 | %{_mandir}/man1/libinput-quirks-list.1* | |
222 | %{_mandir}/man1/libinput-quirks-validate.1* | |
223 | %{_mandir}/man1/libinput-record.1* | |
224 | %{_mandir}/man1/libinput-replay.1* | |
225 | %{_mandir}/man1/libinput-test.1* | |
226 | ||
227 | %if %{with gui} | |
228 | %files gui | |
229 | %defattr(644,root,root,755) | |
230 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-gui | |
231 | %{_mandir}/man1/libinput-debug-gui.1* | |
232 | %endif | |
233 | ||
234 | %files devel | |
235 | %defattr(644,root,root,755) | |
236 | %attr(755,root,root) %{_libdir}/libinput.so | |
237 | %{_includedir}/libinput.h | |
238 | %{_pkgconfigdir}/libinput.pc | |
239 | ||
240 | %if %{with doc} | |
241 | %files apidocs | |
242 | %defattr(644,root,root,755) | |
243 | %doc build/doc/html/* | |
244 | %endif | |
245 | ||
246 | %files -n zsh-completion-%{name} | |
247 | %defattr(644,root,root,755) | |
248 | %{zsh_compdir}/_libinput |