]> git.pld-linux.org Git - packages/libinput.git/blob - libinput.spec
up to 1.20.1 (fixes CVE-2020-1215)
[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.20.1
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:  e86c9cdb3a928d747b191a0910f69d9e
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) /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*
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
231
232 %files devel
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_libdir}/libinput.so
235 %{_includedir}/libinput.h
236 %{_pkgconfigdir}/libinput.pc
237
238 %if %{with doc}
239 %files apidocs
240 %defattr(644,root,root,755)
241 %doc build/doc/html/*
242 %endif
243
244 %files -n zsh-completion-%{name}
245 %defattr(644,root,root,755)
246 %{zsh_compdir}/_libinput
This page took 0.046351 seconds and 3 git commands to generate.