]>
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 |
ac1a5097 | 17 | Version: 1.19.2 |
014b8556 | 18 | Release: 1 |
b1a834ff | 19 | License: MIT |
66c98b1b | 20 | Group: Libraries |
c29a2c14 | 21 | Source0: https://www.freedesktop.org/software/libinput/%{name}-%{version}.tar.xz |
ac1a5097 | 22 | # Source0-md5: 2c7f2aa4032bacb562a535b74829c56d |
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 | |
30108c5d | 32 | BuildRequires: rpm-build >= 4.6 |
5143ab31 | 33 | BuildRequires: rpmbuild(macros) >= 1.752 |
30108c5d | 34 | BuildRequires: sed >= 4.0 |
cedab715 | 35 | BuildRequires: tar >= 1:1.22 |
6258de66 JB |
36 | BuildRequires: udev-devel |
37 | BuildRequires: valgrind | |
cedab715 | 38 | BuildRequires: xz |
a370658f MK |
39 | %if %{with gui} |
40 | BuildRequires: cairo-devel | |
41 | BuildRequires: glib2-devel >= 2.0 | |
1a316496 | 42 | %if %{with gtk4} |
7892c2ae | 43 | BuildRequires: gtk4-devel >= 4.0 |
1a316496 | 44 | %else |
407ae804 | 45 | BuildRequires: gtk+3-devel >= 3.20 |
a370658f | 46 | %endif |
1a316496 JP |
47 | BuildRequires: wayland-devel |
48 | BuildRequires: wayland-protocols | |
49 | BuildRequires: xorg-lib-libX11-devel | |
50 | %endif | |
aed38082 | 51 | %if %{with doc} |
407ae804 | 52 | BuildRequires: doxygen >= 1.8.3 |
bb392f52 | 53 | BuildRequires: graphviz >= 2.26.0 |
578a3803 JP |
54 | BuildRequires: python3-recommonmark |
55 | BuildRequires: python3-sphinx_rtd_theme | |
56 | BuildRequires: sphinx-pdg-3 | |
a370658f | 57 | %endif |
ef04d99c | 58 | Requires: libevdev >= 1.3 |
725df436 JB |
59 | Requires: libwacom >= 0.20 |
60 | Requires: mtdev >= 1.1.0 | |
66c98b1b | 61 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
b1a834ff AM |
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 | ||
66c98b1b JB |
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 | ||
ef04d99c JB |
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} | |
1a316496 | 87 | %if %{with gtk4} |
7892c2ae | 88 | Requires: gtk4 >= 4.0 |
1a316496 | 89 | %else |
407ae804 | 90 | Requires: gtk+3 >= 3.20 |
1a316496 | 91 | %endif |
ef04d99c JB |
92 | |
93 | %description gui | |
94 | Debugging GUI for libinput. | |
95 | ||
96 | %description gui -l pl.UTF-8 | |
97 | Graficzny interfejs diagnostyczny do libinput. | |
98 | ||
66c98b1b JB |
99 | %package devel |
100 | Summary: Development files for libinput | |
101 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libinput | |
102 | Group: Development/Libraries | |
b1a834ff | 103 | Requires: %{name} = %{version}-%{release} |
66c98b1b JB |
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 | ||
66c98b1b JB |
114 | %package apidocs |
115 | Summary: API documentation for libinput library | |
116 | Summary(pl.UTF-8): Dokumentacja API biblioteki libinput | |
117 | Group: Documentation | |
0ae83712 | 118 | BuildArch: noarch |
66c98b1b JB |
119 | |
120 | %description apidocs | |
121 | API documentation for libinput library. | |
122 | ||
123 | %description apidocs -l pl.UTF-8 | |
124 | Dokumentacja API biblioteki libinput. | |
b1a834ff | 125 | |
45341a09 JP |
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 | ||
b1a834ff AM |
139 | %prep |
140 | %setup -q | |
141 | ||
6258de66 | 142 | %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \ |
73f60c09 | 143 | tools/libinput-analyze-{per-slot-delta,recording,touch-down-state}.py \ |
6258de66 | 144 | tools/libinput-measure-{fuzz,touchpad-pressure,touch-size,touchpad-tap}.py \ |
73f60c09 | 145 | tools/libinput-{replay,measure-touchpad-size}.py |
bc749beb | 146 | |
30108c5d JB |
147 | %if %{without gtk4} |
148 | %{__sed} -i -e "/dependency('gtk4'/ s/'gtk4'/'gtk4-disabled'/" meson.build | |
149 | %endif | |
150 | ||
b1a834ff | 151 | %build |
11306b0c | 152 | %meson build \ |
2de91326 AM |
153 | -Ddebug-gui=%{__true_false gui} \ |
154 | -Ddocumentation=%{__true_false doc} \ | |
45341a09 JP |
155 | -Dudev-dir=/lib/udev \ |
156 | -Dzshcompletiondir=%{zsh_compdir} | |
b1a834ff | 157 | |
2ea47e4f JB |
158 | %ninja_build -C build |
159 | ||
160 | %{?with_tests:%ninja_test -C build} | |
b1a834ff AM |
161 | |
162 | %install | |
163 | rm -rf $RPM_BUILD_ROOT | |
164 | ||
2ea47e4f | 165 | %ninja_install -C build |
66c98b1b | 166 | |
a3a0a290 JB |
167 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/libinput-test-suite.1 |
168 | ||
b1a834ff AM |
169 | %clean |
170 | rm -rf $RPM_BUILD_ROOT | |
171 | ||
66c98b1b JB |
172 | %post -p /sbin/ldconfig |
173 | %postun -p /sbin/ldconfig | |
b1a834ff AM |
174 | |
175 | %files | |
176 | %defattr(644,root,root,755) | |
ef04d99c JB |
177 | %doc COPYING README.md |
178 | %attr(755,root,root) %{_bindir}/libinput | |
66c98b1b | 179 | %attr(755,root,root) %{_libdir}/libinput.so.*.*.* |
3bf5286f | 180 | %attr(755,root,root) %ghost %{_libdir}/libinput.so.10 |
ef04d99c | 181 | %dir %{_libexecdir}/libinput |
f15e23dc JP |
182 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze |
183 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-per-slot-delta | |
73f60c09 JP |
184 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-recording |
185 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-touch-down-state | |
ef04d99c | 186 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-events |
7001c1ee | 187 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-tablet |
ef04d99c JB |
188 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-list-devices |
189 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure | |
9a19d5af | 190 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-fuzz |
d254b872 | 191 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-pressure |
f15e23dc | 192 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-size |
ef04d99c | 193 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-tap |
d254b872 | 194 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touch-size |
578a3803 | 195 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-quirks |
9a19d5af JP |
196 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-record |
197 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-replay | |
76cc7e64 | 198 | %attr(755,root,root) /lib/udev/libinput-device-group |
7001c1ee JP |
199 | %attr(755,root,root) /lib/udev/libinput-fuzz-extract |
200 | %attr(755,root,root) /lib/udev/libinput-fuzz-to-zero | |
76cc7e64 | 201 | /lib/udev/rules.d/80-libinput-device-groups.rules |
ad4e8b69 | 202 | /lib/udev/rules.d/90-libinput-fuzz-override.rules |
578a3803 JP |
203 | %dir %{_datadir}/libinput |
204 | %{_datadir}/libinput/*.quirks | |
ef04d99c | 205 | %{_mandir}/man1/libinput.1* |
f15e23dc JP |
206 | %{_mandir}/man1/libinput-analyze.1* |
207 | %{_mandir}/man1/libinput-analyze-per-slot-delta.1* | |
73f60c09 JP |
208 | %{_mandir}/man1/libinput-analyze-recording.1* |
209 | %{_mandir}/man1/libinput-analyze-touch-down-state.1* | |
cf0d28df | 210 | %{_mandir}/man1/libinput-debug-events.1* |
7001c1ee | 211 | %{_mandir}/man1/libinput-debug-tablet.1* |
1573a790 | 212 | %{_mandir}/man1/libinput-list-devices.1* |
ef04d99c | 213 | %{_mandir}/man1/libinput-measure.1* |
9a19d5af | 214 | %{_mandir}/man1/libinput-measure-fuzz.1* |
d254b872 | 215 | %{_mandir}/man1/libinput-measure-touchpad-pressure.1* |
f15e23dc | 216 | %{_mandir}/man1/libinput-measure-touchpad-size.1* |
ef04d99c | 217 | %{_mandir}/man1/libinput-measure-touchpad-tap.1* |
d254b872 | 218 | %{_mandir}/man1/libinput-measure-touch-size.1* |
578a3803 JP |
219 | %{_mandir}/man1/libinput-quirks.1* |
220 | %{_mandir}/man1/libinput-quirks-list.1* | |
221 | %{_mandir}/man1/libinput-quirks-validate.1* | |
9a19d5af JP |
222 | %{_mandir}/man1/libinput-record.1* |
223 | %{_mandir}/man1/libinput-replay.1* | |
ef04d99c JB |
224 | |
225 | %if %{with gui} | |
226 | %files gui | |
227 | %defattr(644,root,root,755) | |
228 | %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-gui | |
229 | %{_mandir}/man1/libinput-debug-gui.1* | |
230 | %endif | |
b1a834ff AM |
231 | |
232 | %files devel | |
233 | %defattr(644,root,root,755) | |
b1a834ff | 234 | %attr(755,root,root) %{_libdir}/libinput.so |
66c98b1b | 235 | %{_includedir}/libinput.h |
b1a834ff | 236 | %{_pkgconfigdir}/libinput.pc |
66c98b1b | 237 | |
aed38082 | 238 | %if %{with doc} |
66c98b1b JB |
239 | %files apidocs |
240 | %defattr(644,root,root,755) | |
3a91b81a | 241 | %doc build/doc/html/* |
aed38082 | 242 | %endif |
45341a09 JP |
243 | |
244 | %files -n zsh-completion-%{name} | |
245 | %defattr(644,root,root,755) | |
246 | %{zsh_compdir}/_libinput |