]>
Commit | Line | Data |
---|---|---|
fe0e5c99 JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # documentation | |
4 | %bcond_without static_libs # static libraries | |
5 | ||
6 | Summary: Library for Emulated Input | |
7 | Name: libei | |
8 | Version: 1.0.0 | |
9 | Release: 1 | |
10 | License: MIT | |
11 | Group: Libraries | |
12 | Source0: https://gitlab.freedesktop.org/libinput/libei/-/archive/%{version}/%{name}-%{version}.tar.bz2 | |
13 | # Source0-md5: aec26e2f653b3c8ccbb88705c0a399e5 | |
14 | URL: https://libinput.pages.freedesktop.org/libei/ | |
15 | %{?with_apidocs:BuildRequires: doxygen} | |
16 | BuildRequires: libevdev-devel | |
17 | BuildRequires: libxml2-progs | |
18 | BuildRequires: meson >= 0.56.0 | |
19 | BuildRequires: ninja >= 1.5 | |
20 | BuildRequires: pkgconfig | |
21 | BuildRequires: python3 | |
22 | BuildRequires: python3-attrs | |
23 | BuildRequires: python3-jinja2 | |
24 | BuildRequires: python3-modules | |
25 | BuildRequires: rpm-build >= 4.6 | |
26 | BuildRequires: rpmbuild(macros) >= 1.736 | |
27 | BuildRequires: systemd-devel | |
28 | BuildRequires: xorg-lib-libxkbcommon-devel | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | libei is a library for Emulated Input, primarily aimed at the Wayland | |
33 | stack. It provides three parts: | |
34 | ||
35 | - EI (Emulated Input) for the client side (libei) | |
36 | - EIS (Emulated Input Server) for the server side (libeis) | |
37 | - oeffis is an optional helper library for DBus communication with the | |
38 | XDG RemoteDesktop portal (liboeffis) | |
39 | ||
40 | This package ships libei. | |
41 | ||
42 | %package devel | |
43 | Summary: Development files for libei | |
44 | Group: Development/Libraries | |
45 | Requires: %{name} = %{version}-%{release} | |
46 | ||
47 | %description devel | |
48 | This package contains the header files for developing applications | |
49 | that use libei. | |
50 | ||
51 | %package static | |
52 | Summary: Static libei library | |
53 | Group: Development/Libraries | |
54 | Requires: %{name}-devel = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static libei library. | |
58 | ||
59 | %package tools | |
60 | Summary: Utilities for libei | |
61 | Group: Applications | |
62 | Requires: %{name} = %{version}-%{release} | |
63 | ||
64 | %description tools | |
65 | Utilities for libei. | |
66 | ||
67 | %package -n libeis | |
68 | Summary: Library for Emulated Input | |
69 | ||
70 | %description -n libeis | |
71 | libei is a library for Emulated Input, primarily aimed at the Wayland | |
72 | stack. It provides three parts: | |
73 | ||
74 | - EI (Emulated Input) for the client side (libei) | |
75 | - EIS (Emulated Input Server) for the server side (libeis) | |
76 | - oeffis is an optional helper library for DBus communication with the | |
77 | XDG RemoteDesktop portal (liboeffis) | |
78 | ||
79 | This package ships libeis. | |
80 | ||
81 | %package -n libeis-devel | |
82 | Summary: Development files for libeis | |
83 | Group: Development/Libraries | |
84 | Requires: libeis = %{version}-%{release} | |
85 | ||
86 | %description -n libeis-devel | |
87 | This package contains the header files for developing applications | |
88 | that use libeis. | |
89 | ||
90 | %package -n libeis-static | |
91 | Summary: Static libeis library | |
92 | Group: Development/Libraries | |
93 | Requires: libeis-devel = %{version}-%{release} | |
94 | ||
95 | %description -n libeis-static | |
96 | Static libeis library. | |
97 | ||
98 | %package -n liboeffis | |
99 | Summary: Library for Emulated Input | |
100 | ||
101 | %description -n liboeffis | |
102 | libei is a library for Emulated Input, primarily aimed at the Wayland | |
103 | stack. It provides three parts: | |
104 | ||
105 | - EI (Emulated Input) for the client side (libei) | |
106 | - EIS (Emulated Input Server) for the server side (libeis) | |
107 | - oeffis is an optional helper library for DBus communication with the | |
108 | XDG RemoteDesktop portal (liboeffis) | |
109 | ||
110 | This package ships liboeffis. | |
111 | ||
112 | %package -n liboeffis-devel | |
113 | Summary: Development files for liboeffis | |
114 | Group: Development/Libraries | |
115 | Requires: liboeffis = %{version}-%{release} | |
116 | ||
117 | %description -n liboeffis-devel | |
118 | This package contains the header files for developing applications | |
119 | that use liboeffis. | |
120 | ||
121 | %package -n liboeffis-static | |
122 | Summary: Static liboeffis library | |
123 | Group: Development/Libraries | |
124 | Requires: liboeffis-devel = %{version}-%{release} | |
125 | ||
126 | %description -n liboeffis-static | |
127 | Static liboeffis library. | |
128 | ||
129 | %package apidocs | |
130 | Summary: API documentation for libei library | |
131 | Group: Documentation | |
132 | BuildArch: noarch | |
133 | ||
134 | %description apidocs | |
135 | API documentation for libei library. | |
136 | ||
137 | %prep | |
138 | %setup -q | |
139 | ||
140 | %build | |
141 | %meson build \ | |
142 | %{!?with_static_libs:--default-library=shared} \ | |
143 | -Ddocumentation=%{?with_apidocs:api} \ | |
144 | -Dliboeffis=enabled \ | |
145 | -Dsd-bus-provider=libsystemd \ | |
146 | -Dtests=disabled | |
147 | ||
148 | %ninja_build -C build | |
149 | ||
150 | %install | |
151 | rm -rf $RPM_BUILD_ROOT | |
152 | ||
153 | %ninja_install -C build | |
154 | ||
155 | %clean | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
158 | %post -p /sbin/ldconfig | |
159 | %postun -p /sbin/ldconfig | |
160 | ||
161 | %post -n libeis -p /sbin/ldconfig | |
162 | %postun -n libeis -p /sbin/ldconfig | |
163 | ||
164 | %post -n liboeffis -p /sbin/ldconfig | |
165 | %postun -n liboeffis -p /sbin/ldconfig | |
166 | ||
167 | %files | |
168 | %defattr(644,root,root,755) | |
169 | %doc COPYING README.md | |
170 | %attr(755,root,root) %{_libdir}/libei.so.*.*.* | |
171 | %attr(755,root,root) %ghost %{_libdir}/libei.so.1 | |
172 | ||
173 | %files devel | |
174 | %defattr(644,root,root,755) | |
175 | %attr(755,root,root) %{_libdir}/libei.so | |
176 | %dir %{_includedir}/libei-1.0 | |
177 | %{_includedir}/libei-1.0/libei.h | |
178 | %{_pkgconfigdir}/libei-1.0.pc | |
179 | ||
180 | %if %{with static_libs} | |
181 | %files static | |
182 | %defattr(644,root,root,755) | |
183 | %{_libdir}/libei.a | |
184 | %endif | |
185 | ||
186 | %files tools | |
187 | %defattr(644,root,root,755) | |
188 | %attr(755,root,root) %{_bindir}/ei-debug-events | |
189 | ||
190 | %files -n libeis | |
191 | %defattr(644,root,root,755) | |
192 | %doc COPYING README.md | |
193 | %attr(755,root,root) %{_libdir}/libeis.so.*.*.* | |
194 | %attr(755,root,root) %ghost %{_libdir}/libeis.so.1 | |
195 | ||
196 | %files -n libeis-devel | |
197 | %defattr(644,root,root,755) | |
198 | %attr(755,root,root) %{_libdir}/libeis.so | |
199 | %{_includedir}/libei-1.0/libeis.h | |
200 | %{_pkgconfigdir}/libeis-1.0.pc | |
201 | ||
202 | %if %{with static_libs} | |
203 | %files -n libeis-static | |
204 | %defattr(644,root,root,755) | |
205 | %{_libdir}/libeis.a | |
206 | %endif | |
207 | ||
208 | %files -n liboeffis | |
209 | %defattr(644,root,root,755) | |
210 | %doc COPYING README.md | |
211 | %attr(755,root,root) %{_libdir}/liboeffis.so.*.*.* | |
212 | %attr(755,root,root) %ghost %{_libdir}/liboeffis.so.1 | |
213 | ||
214 | %files -n liboeffis-devel | |
215 | %defattr(644,root,root,755) | |
216 | %attr(755,root,root) %{_libdir}/liboeffis.so | |
217 | %{_includedir}/libei-1.0/liboeffis.h | |
218 | %{_pkgconfigdir}/liboeffis-1.0.pc | |
219 | ||
220 | %if %{with static_libs} | |
221 | %files -n liboeffis-static | |
222 | %defattr(644,root,root,755) | |
223 | %{_libdir}/liboeffis.a | |
224 | %endif | |
225 | ||
226 | %if %{with apidocs} | |
227 | %files apidocs | |
228 | %defattr(644,root,root,755) | |
229 | %doc build/doc/html/* | |
230 | %endif |