]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs | |
4 | %bcond_without dell # Dell-specific support | |
5 | %bcond_without efi # UEFI (and dell, redfish) support | |
6 | %bcond_without flashrom # flashrom plugin | |
7 | %bcond_without modemmanager # modem_manager plugin | |
8 | %bcond_without thunderbolt # Thunderbolt support | |
9 | ||
10 | %ifnarch %{ix86} %{x8664} x32 %{arm} aarch64 | |
11 | %undefine with_efi | |
12 | %endif | |
13 | # libsmbios archs | |
14 | %ifnarch %{ix86} %{x8664} x32 | |
15 | %undefine with_dell | |
16 | %endif | |
17 | %if %{without efi} | |
18 | %undefine with_dell | |
19 | %endif | |
20 | %ifarch %{ix86} %{x8664} x32 | |
21 | %define with_intel_spi 1 | |
22 | %endif | |
23 | Summary: System daemon for installing device firmware | |
24 | Summary(pl.UTF-8): Demon systemowy do instalowania firmware'u urządzeń | |
25 | Name: fwupd | |
26 | Version: 1.8.10 | |
27 | Release: 1 | |
28 | License: LGPL v2.1+ | |
29 | Group: Applications/System | |
30 | Source0: https://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz | |
31 | # Source0-md5: bf6b6486f79732656980ba17a2087362 | |
32 | URL: https://github.com/hughsie/fwupd | |
33 | %{?with_modemmanager:BuildRequires: ModemManager-devel >= 1.10.0} | |
34 | BuildRequires: bash-completion-devel >= 1:2.0 | |
35 | %{?with_cairo:BuildRequires: cairo-devel} | |
36 | BuildRequires: curl-devel >= 7.62.0 | |
37 | %{?with_efi:BuildRequires: efivar-devel >= 33} | |
38 | # pkgconfig(libelf); can be also libelf-devel | |
39 | BuildRequires: gcab-devel >= 1.0 | |
40 | # C11 | |
41 | BuildRequires: gcc >= 6:4.7 | |
42 | %ifarch x32 | |
43 | BuildRequires: gcc-multilib-64 >= 6:4.7 | |
44 | %endif | |
45 | BuildRequires: gettext-tools >= 0.19.7 | |
46 | BuildRequires: glib2-devel >= 1:2.55.0 | |
47 | BuildRequires: gnutls-devel >= 3.6.0 | |
48 | BuildRequires: gobject-introspection-devel >= 0.9.8 | |
49 | %{?with_doc:BuildRequires: gi-docgen >= 2022.2} | |
50 | BuildRequires: json-glib-devel >= 1.1.1 | |
51 | BuildRequires: libarchive-devel | |
52 | BuildRequires: libcbor-devel >= 0.7.0 | |
53 | %{?with_flashrom:BuildRequires: libflashrom-devel >= 1.2} | |
54 | BuildRequires: libgudev-devel >= 232 | |
55 | BuildRequires: libgusb-devel >= 0.3.5 | |
56 | BuildRequires: libjcat-devel >= 0.1.4 | |
57 | %{?with_modemmanager:BuildRequires: libmbim-devel >= 1.22.0} | |
58 | %{?with_modemmanager:BuildRequires: libqmi-devel >= 1.23.1} | |
59 | # for dell (which requires also uefi plugin and efivar) | |
60 | %{?with_dell:BuildRequires: libsmbios-devel >= 2.4.0} | |
61 | BuildRequires: libsoup-devel >= 2.52 | |
62 | BuildRequires: libuuid-devel | |
63 | BuildRequires: libxmlb-devel >= 0.1.15 | |
64 | # for <linux/nvme_ioctl.h> | |
65 | BuildRequires: linux-libc-headers >= 7:4.4 | |
66 | BuildRequires: meson >= 0.61.0 | |
67 | BuildRequires: ninja >= 1.6 | |
68 | BuildRequires: pkgconfig | |
69 | BuildRequires: polkit-devel >= 0.114 | |
70 | BuildRequires: python3 >= 1:3.0 | |
71 | BuildRequires: rpm-build >= 4.6 | |
72 | BuildRequires: rpmbuild(macros) >= 1.736 | |
73 | BuildRequires: sqlite3-devel >= 3 | |
74 | BuildRequires: systemd-devel >= 1:209 | |
75 | BuildRequires: systemd-units >= 1:211 | |
76 | BuildRequires: tar >= 1:1.22 | |
77 | BuildRequires: tpm2-tss-devel >= 2.0 | |
78 | BuildRequires: udev-devel | |
79 | %{?with_thunderbolt:BuildRequires: umockdev-devel} | |
80 | BuildRequires: xz | |
81 | BuildRequires: xz-devel | |
82 | # efi capsule splash (po/test-deps) | |
83 | %if %{with efi} | |
84 | # any Sans font | |
85 | BuildRequires: fonts-TTF-DejaVu | |
86 | BuildRequires: gobject-introspection-devel | |
87 | BuildRequires: pango >= 1:1.26.0 | |
88 | BuildRequires: python3-pycairo | |
89 | BuildRequires: python3-pygobject3 | |
90 | %endif | |
91 | Requires: %{name}-libs = %{version}-%{release} | |
92 | %{?with_modemmanager:BuildRequires: ModemManager-libs >= 1.10.0} | |
93 | Requires: curl-libs >= 7.62.0 | |
94 | Requires: gcab >= 1.0 | |
95 | Requires: gnutls-libs >= 3.6.0 | |
96 | Requires: libcbor >= 0.7.0 | |
97 | Requires: libgudev >= 232 | |
98 | Requires: libgusb >= 0.3.5 | |
99 | Requires: libjcat >= 0.1.4 | |
100 | %{?with_modemmanager:Requires: libmbim >= 1.22.0} | |
101 | %{?with_modemmanager:Requires: libqmi >= 1.23.1} | |
102 | %{?with_dell:Requires: libsmbios >= 2.4.0} | |
103 | Requires: libsoup >= 2.52 | |
104 | Requires: libxmlb >= 0.1.15 | |
105 | Requires: polkit >= 0.114 | |
106 | Requires: tpm2-tss >= 2.0 | |
107 | %if %{with efi} | |
108 | Suggests: fwupd-efi | |
109 | %endif | |
110 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
111 | ||
112 | %define fwupd_plugins_dir %{_libdir}/fwupd-%{version} | |
113 | ||
114 | %description | |
115 | fwupd is a simple daemon to allow session software to update device | |
116 | firmware on your local machine. It's designed for desktops, but this | |
117 | project is probably quite interesting for phones, tablets and server | |
118 | farms. | |
119 | ||
120 | %description -l pl.UTF-8 | |
121 | fwupd to prosty demon pozwalający programom sesyjnym na aktualizację | |
122 | firmware'u urządzeń na maszynie lokalnej. Jest zaprojektowany dla | |
123 | komputerów osobistych, ale może być interesujący także dla telefonów, | |
124 | tabletów i farm serwerów. | |
125 | ||
126 | %package -n bash-completion-fwupd | |
127 | Summary: Bash completion for fwupd commands | |
128 | Summary(pl.UTF-8): Bashowe dopełnianie składni poleceń fwupd | |
129 | Group: Applications/Shells | |
130 | Requires: %{name} = %{version}-%{release} | |
131 | Requires: bash-completion >= 1:2.0 | |
132 | BuildArch: noarch | |
133 | ||
134 | %description -n bash-completion-fwupd | |
135 | Bash completion for fwupd commands. | |
136 | ||
137 | %description -n bash-completion-fwupd -l pl.UTF-8 | |
138 | Bashowe dopełnianie składni poleceń fwupd. | |
139 | ||
140 | %package -n fish-completion-fwupd | |
141 | Summary: Fish completion for fwupd commands | |
142 | Summary(pl.UTF-8): Dopełnianie składni poleceń fwupd w fish | |
143 | Group: Applications/Shells | |
144 | Requires: %{name} = %{version}-%{release} | |
145 | Requires: fish | |
146 | BuildArch: noarch | |
147 | ||
148 | %description -n fish-completion-fwupd | |
149 | Fish completion for fwupd commands. | |
150 | ||
151 | %description -n fish-completion-fwupd -l pl.UTF-8 | |
152 | Dopełnianie składni poleceń fwupd w fish. | |
153 | ||
154 | %package libs | |
155 | Summary: Libraries for fwupd device firmware installing daemon | |
156 | Summary(pl.UTF-8): Biblioteki dla demona fwupd instalującego aktualizacje firmware'u | |
157 | Group: Libraries | |
158 | Requires: glib2-devel >= 1:2.55.0 | |
159 | Requires: json-glib >= 1.1.1 | |
160 | ||
161 | %description libs | |
162 | Libraries for fwupd device firmware installing daemon. | |
163 | ||
164 | %description libs -l pl.UTF-8 | |
165 | Biblioteki dla demona fwupd instalującego aktualizacje firmware'u. | |
166 | ||
167 | %package devel | |
168 | Summary: Header files for fwupd libraries | |
169 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek fwupd | |
170 | Group: Development/Libraries | |
171 | Requires: %{name}-libs = %{version}-%{release} | |
172 | Requires: glib2-devel >= 1:2.55.0 | |
173 | ||
174 | %description devel | |
175 | Header files for fwupd libraries. | |
176 | ||
177 | %description devel -l pl.UTF-8 | |
178 | Pliki nagłówkowe bibliotek fwupd. | |
179 | ||
180 | %package static | |
181 | Summary: Static fwupd libraries | |
182 | Summary(pl.UTF-8): Statyczne biblioteki fwupd | |
183 | Group: Development/Libraries | |
184 | Requires: %{name}-devel = %{version}-%{release} | |
185 | ||
186 | %description static | |
187 | Static fwupd libraries. | |
188 | ||
189 | %description static -l pl.UTF-8 | |
190 | Statyczne biblioteki fwupd. | |
191 | ||
192 | %package apidocs | |
193 | Summary: API documentation for fwupd libraries | |
194 | Summary(pl.UTF-8): Dokumentacja API do bibliotek fwupd | |
195 | Group: Documentation | |
196 | BuildArch: noarch | |
197 | ||
198 | %description apidocs | |
199 | API documentation for fwupd libraries. | |
200 | ||
201 | %description apidocs -l pl.UTF-8 | |
202 | Dokumentacja API do bibliotek fwupd. | |
203 | ||
204 | %package -n vala-fwupd | |
205 | Summary: Vala API for fwupd library | |
206 | Summary(pl.UTF-8): API języka Vala do biblioteki fwupd | |
207 | Group: Development/Libraries | |
208 | Requires: %{name}-devel = %{version}-%{release} | |
209 | Requires: vala-libsoup >= 2.52 | |
210 | ||
211 | %description -n vala-fwupd | |
212 | Vala API for fwupd library. | |
213 | ||
214 | %description -n vala-fwupd -l pl.UTF-8 | |
215 | API języka Vala do biblioteki fwupd. | |
216 | ||
217 | %prep | |
218 | %setup -q | |
219 | ||
220 | %build | |
221 | %meson build \ | |
222 | -Dbluez=enabled \ | |
223 | -Defi_binary=false \ | |
224 | -Ddocs=%{__enabled_disabled apidocs} \ | |
225 | -Dlzma=enabled \ | |
226 | %{!?with_dell:-Dplugin_dell=disabled} \ | |
227 | %{!?with_flashrom:-Dplugin_flashrom=disabled} \ | |
228 | %{?with_intel_spi:-Dplugin_intel_spi=true} \ | |
229 | %{!?with_modemmanager:-Dplugin_modem_manager=disabled} \ | |
230 | %{!?with_efi:-Dplugin_redfish=disabled} \ | |
231 | %{!?with_efi:-Dplugin_uefi_capsule=disabled} \ | |
232 | %{!?with_efi:-Dplugin_uefi_pk=disabled} \ | |
233 | -Dtests=false | |
234 | ||
235 | %ninja_build -C build | |
236 | ||
237 | %install | |
238 | rm -rf $RPM_BUILD_ROOT | |
239 | ||
240 | %ninja_install -C build | |
241 | ||
242 | for pdoc in plugins/*/README.md ; do | |
243 | pname=$(basename $(dirname $pdoc)) | |
244 | cp -p plugins/${pname}/README.md README-${pname}.md | |
245 | done | |
246 | ||
247 | %if %{with apidocs} | |
248 | # FIXME: where to package gi-docgen generated docs? | |
249 | install -d $RPM_BUILD_ROOT%{_gtkdocdir} | |
250 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/*fwupd* $RPM_BUILD_ROOT%{_gtkdocdir} | |
251 | %endif | |
252 | ||
253 | %find_lang %{name} | |
254 | ||
255 | %clean | |
256 | rm -rf $RPM_BUILD_ROOT | |
257 | ||
258 | %post libs -p /sbin/ldconfig | |
259 | %postun libs -p /sbin/ldconfig | |
260 | ||
261 | %files -f %{name}.lang | |
262 | %defattr(644,root,root,755) | |
263 | %doc AUTHORS MAINTAINERS README.md README-*.md SECURITY.md | |
264 | %{?with_efi:%attr(755,root,root) %{_bindir}/dbxtool} | |
265 | %attr(755,root,root) %{_bindir}/dfu-tool | |
266 | %attr(755,root,root) %{_bindir}/fwupdagent | |
267 | %{?with_efi:%attr(755,root,root) %{_bindir}/fwupdate} | |
268 | %attr(755,root,root) %{_bindir}/fwupdmgr | |
269 | %attr(755,root,root) %{_bindir}/fwupdtool | |
270 | %dir %{_libexecdir}/fwupd | |
271 | %attr(755,root,root) %{_libexecdir}/fwupd/fwupd | |
272 | %ifarch %{ix86} %{x8664} x32 | |
273 | %attr(755,root,root) %{_libexecdir}/fwupd/fwupd-detect-cet | |
274 | %endif | |
275 | %attr(755,root,root) %{_libexecdir}/fwupd/fwupdoffline | |
276 | %if %{with flashrom} | |
277 | %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_flashrom.so | |
278 | %endif | |
279 | %if %{with modemmanager} | |
280 | %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_modem_manager.so | |
281 | %endif | |
282 | %dir %{_sysconfdir}/fwupd | |
283 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/daemon.conf | |
284 | %ifarch %{ix86} %{x8664} x32 | |
285 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/msr.conf | |
286 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/thunderbolt.conf | |
287 | %endif | |
288 | %if %{with efi} | |
289 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/redfish.conf | |
290 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/uefi_capsule.conf | |
291 | %endif | |
292 | %dir %{_sysconfdir}/fwupd/remotes.d | |
293 | %if %{with dell} | |
294 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/dell-esrt.conf | |
295 | %endif | |
296 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs.conf | |
297 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs-testing.conf | |
298 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor.conf | |
299 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor-directory.conf | |
300 | #/etc/grub.d/35_fwupd | |
301 | %dir %{_sysconfdir}/pki/fwupd | |
302 | %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Foundation-Firmware | |
303 | %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service | |
304 | %{_sysconfdir}/pki/fwupd/LVFS-CA.pem | |
305 | %dir %{_sysconfdir}/pki/fwupd-metadata | |
306 | %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata | |
307 | %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service | |
308 | %{_sysconfdir}/pki/fwupd-metadata/LVFS-CA.pem | |
309 | #/lib/modules-load.d/fwupd-msr.conf | |
310 | %{systemdunitdir}/fwupd.service | |
311 | %{systemdunitdir}/fwupd-offline-update.service | |
312 | %{systemdunitdir}/fwupd-refresh.service | |
313 | %{systemdunitdir}/fwupd-refresh.timer | |
314 | %{systemdunitdir}/system-update.target.wants/fwupd-offline-update.service | |
315 | /lib/systemd/system-preset/fwupd-refresh.preset | |
316 | /lib/systemd/system-shutdown/fwupd.shutdown | |
317 | /lib/udev/rules.d/90-fwupd-devices.rules | |
318 | %{_datadir}/dbus-1/system.d/org.freedesktop.fwupd.conf | |
319 | %{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service | |
320 | %dir %{_datadir}/fwupd | |
321 | %attr(755,root,root) %{_datadir}/fwupd/add_capsule_header.py | |
322 | %attr(755,root,root) %{_datadir}/fwupd/firmware_packager.py | |
323 | %attr(755,root,root) %{_datadir}/fwupd/install_dell_bios_exe.py | |
324 | %attr(755,root,root) %{_datadir}/fwupd/simple_client.py | |
325 | %if %{with efi} | |
326 | %{_datadir}/fwupd/uefi-capsule-ux.tar.xz | |
327 | %endif | |
328 | %{_datadir}/fwupd/quirks.d | |
329 | %dir %{_datadir}/fwupd/remotes.d | |
330 | %if %{with dell} | |
331 | %{_datadir}/fwupd/remotes.d/dell-esrt | |
332 | %endif | |
333 | %{_datadir}/fwupd/remotes.d/vendor | |
334 | %{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml | |
335 | %dir %{_datadir}/fwupd/metainfo | |
336 | %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs-testing.metainfo.xml | |
337 | %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs.metainfo.xml | |
338 | %{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy | |
339 | %{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules | |
340 | %{_iconsdir}/hicolor/scalable/apps/org.freedesktop.fwupd.svg | |
341 | %{?with_efi:%{_mandir}/man1/dbxtool.1*} | |
342 | %{_mandir}/man1/dfu-tool.1* | |
343 | %{_mandir}/man1/fwupdagent.1* | |
344 | %{?with_efi:%{_mandir}/man1/fwupdate.1*} | |
345 | %{_mandir}/man1/fwupdmgr.1* | |
346 | %{_mandir}/man1/fwupdtool.1* | |
347 | ||
348 | %files -n bash-completion-fwupd | |
349 | %defattr(644,root,root,755) | |
350 | %{bash_compdir}/fwupdagent | |
351 | %{bash_compdir}/fwupdmgr | |
352 | %{bash_compdir}/fwupdtool | |
353 | ||
354 | %files -n fish-completion-fwupd | |
355 | %defattr(644,root,root,755) | |
356 | %{_datadir}/fish/vendor_completions.d/fwupdmgr.fish | |
357 | ||
358 | %files libs | |
359 | %defattr(644,root,root,755) | |
360 | %attr(755,root,root) %{_libdir}/libfwupd.so.*.*.* | |
361 | %attr(755,root,root) %ghost %{_libdir}/libfwupd.so.2 | |
362 | %{_libdir}/girepository-1.0/Fwupd-2.0.typelib | |
363 | %dir %{fwupd_plugins_dir} | |
364 | %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdengine.so | |
365 | %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdplugin.so | |
366 | %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdutil.so | |
367 | ||
368 | %files devel | |
369 | %defattr(644,root,root,755) | |
370 | %doc libfwupd/README.md | |
371 | %attr(755,root,root) %{_libdir}/libfwupd.so | |
372 | %{_includedir}/fwupd-1 | |
373 | %{_datadir}/gir-1.0/Fwupd-2.0.gir | |
374 | %{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml | |
375 | %{_pkgconfigdir}/fwupd.pc | |
376 | ||
377 | %files static | |
378 | %defattr(644,root,root,755) | |
379 | %{_libdir}/libfwupd.a | |
380 | %{fwupd_plugins_dir}/libfwupdengine.a | |
381 | %{fwupd_plugins_dir}/libfwupdplugin.a | |
382 | %{fwupd_plugins_dir}/libfwupdutil.a | |
383 | ||
384 | %if %{with apidocs} | |
385 | %files apidocs | |
386 | %defattr(644,root,root,755) | |
387 | %{_gtkdocdir}/fwupd | |
388 | %{_gtkdocdir}/libfwupd | |
389 | %{_gtkdocdir}/libfwupdplugin | |
390 | %endif | |
391 | ||
392 | %files -n vala-fwupd | |
393 | %defattr(644,root,root,755) | |
394 | %{_datadir}/vala/vapi/fwupd.deps | |
395 | %{_datadir}/vala/vapi/fwupd.vapi |