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