]> git.pld-linux.org Git - packages/libinput.git/blob - libinput.spec
up to 1.25.0
[packages/libinput.git] / libinput.spec
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.25.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:  ab452d2dac4edc5d0eff21a329d2869a
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.56.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 %{?with_tests: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 BuildArch:      noarch
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
140 %prep
141 %setup -q
142
143 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
144         tools/libinput-analyze-{per-slot-delta,recording,touch-down-state}.py \
145         tools/libinput-list-kernel-devices.py \
146         tools/libinput-measure-{fuzz,touchpad-pressure,touch-size,touchpad-tap}.py \
147         tools/libinput-{replay,measure-touchpad-size}.py
148
149 %if %{without gtk4}
150 %{__sed} -i -e "/dependency('gtk4'/ s/'gtk4'/'gtk4-disabled'/" meson.build
151 %endif
152
153 %build
154 %meson build \
155         -Ddebug-gui=%{__true_false gui} \
156         -Ddocumentation=%{__true_false doc} \
157         -Dtests=%{__true_false tests} \
158         -Dudev-dir=/lib/udev \
159         -Dzshcompletiondir=%{zsh_compdir}
160
161 %ninja_build -C build
162
163 %{?with_tests:%ninja_test -C build}
164
165 %install
166 rm -rf $RPM_BUILD_ROOT
167
168 %ninja_install -C build
169
170 %{?with_tests:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/libinput-test-suite.1}
171
172 %clean
173 rm -rf $RPM_BUILD_ROOT
174
175 %post   -p /sbin/ldconfig
176 %postun -p /sbin/ldconfig
177
178 %files
179 %defattr(644,root,root,755)
180 %doc COPYING README.md
181 %attr(755,root,root) %{_bindir}/libinput
182 %attr(755,root,root) %{_libdir}/libinput.so.*.*.*
183 %attr(755,root,root) %ghost %{_libdir}/libinput.so.10
184 %dir %{_libexecdir}/libinput
185 %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze
186 %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-per-slot-delta
187 %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-recording
188 %attr(755,root,root) %{_libexecdir}/libinput/libinput-analyze-touch-down-state
189 %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-events
190 %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-tablet
191 %attr(755,root,root) %{_libexecdir}/libinput/libinput-list-devices
192 %attr(755,root,root) %{_libexecdir}/libinput/libinput-list-kernel-devices
193 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure
194 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-fuzz
195 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-pressure
196 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-size
197 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touchpad-tap
198 %attr(755,root,root) %{_libexecdir}/libinput/libinput-measure-touch-size
199 %attr(755,root,root) %{_libexecdir}/libinput/libinput-quirks
200 %attr(755,root,root) %{_libexecdir}/libinput/libinput-record
201 %attr(755,root,root) %{_libexecdir}/libinput/libinput-replay
202 %attr(755,root,root) %{_libexecdir}/libinput/libinput-test
203 %attr(755,root,root) /lib/udev/libinput-device-group
204 %attr(755,root,root) /lib/udev/libinput-fuzz-extract
205 %attr(755,root,root) /lib/udev/libinput-fuzz-to-zero
206 /lib/udev/rules.d/80-libinput-device-groups.rules
207 /lib/udev/rules.d/90-libinput-fuzz-override.rules
208 %dir %{_datadir}/libinput
209 %{_datadir}/libinput/*.quirks
210 %{_mandir}/man1/libinput.1*
211 %{_mandir}/man1/libinput-analyze.1*
212 %{_mandir}/man1/libinput-analyze-per-slot-delta.1*
213 %{_mandir}/man1/libinput-analyze-recording.1*
214 %{_mandir}/man1/libinput-analyze-touch-down-state.1*
215 %{_mandir}/man1/libinput-debug-events.1*
216 %{_mandir}/man1/libinput-debug-tablet.1*
217 %{_mandir}/man1/libinput-list-devices.1*
218 %{_mandir}/man1/libinput-list-kernel-devices.1*
219 %{_mandir}/man1/libinput-measure.1*
220 %{_mandir}/man1/libinput-measure-fuzz.1*
221 %{_mandir}/man1/libinput-measure-touchpad-pressure.1*
222 %{_mandir}/man1/libinput-measure-touchpad-size.1*
223 %{_mandir}/man1/libinput-measure-touchpad-tap.1*
224 %{_mandir}/man1/libinput-measure-touch-size.1*
225 %{_mandir}/man1/libinput-quirks.1*
226 %{_mandir}/man1/libinput-quirks-list.1*
227 %{_mandir}/man1/libinput-quirks-validate.1*
228 %{_mandir}/man1/libinput-record.1*
229 %{_mandir}/man1/libinput-replay.1*
230 %{_mandir}/man1/libinput-test.1*
231
232 %if %{with gui}
233 %files gui
234 %defattr(644,root,root,755)
235 %attr(755,root,root) %{_libexecdir}/libinput/libinput-debug-gui
236 %{_mandir}/man1/libinput-debug-gui.1*
237 %endif
238
239 %files devel
240 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_libdir}/libinput.so
242 %{_includedir}/libinput.h
243 %{_pkgconfigdir}/libinput.pc
244
245 %if %{with doc}
246 %files apidocs
247 %defattr(644,root,root,755)
248 %doc build/doc/html/*
249 %endif
250
251 %files -n zsh-completion-%{name}
252 %defattr(644,root,root,755)
253 %{zsh_compdir}/_libinput
This page took 0.222598 seconds and 3 git commands to generate.