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
10 %ifnarch %{ix86} %{x8664} x32 %{arm} aarch64
14 %ifnarch %{ix86} %{x8664} x32
20 %ifarch %{ix86} %{x8664} x32
21 %define with_intel_spi 1
23 Summary: System daemon for installing device firmware
24 Summary(pl.UTF-8): Demon systemowy do instalowania firmware'u urządzeń
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
41 BuildRequires: gcc >= 6:4.7
43 BuildRequires: gcc-multilib-64 >= 6:4.7
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: python3-pillow
72 BuildRequires: python3-pycairo
73 BuildRequires: rpm-build >= 4.6
74 BuildRequires: rpmbuild(macros) >= 1.736
75 BuildRequires: sqlite3-devel >= 3
76 BuildRequires: systemd-devel >= 1:209
77 BuildRequires: systemd-units >= 1:211
78 BuildRequires: tar >= 1:1.22
79 BuildRequires: tpm2-tss-devel >= 2.0
80 BuildRequires: udev-devel
81 %{?with_thunderbolt:BuildRequires: umockdev-devel}
83 BuildRequires: xz-devel
84 Requires: %{name}-libs = %{version}-%{release}
85 %{?with_modemmanager:BuildRequires: ModemManager-libs >= 1.10.0}
86 Requires: curl-libs >= 7.62.0
88 Requires: gnutls-libs >= 3.6.0
89 Requires: libcbor >= 0.7.0
90 Requires: libgudev >= 232
91 Requires: libgusb >= 0.3.5
92 Requires: libjcat >= 0.1.4
93 %{?with_modemmanager:Requires: libmbim >= 1.22.0}
94 %{?with_modemmanager:Requires: libqmi >= 1.23.1}
95 %{?with_dell:Requires: libsmbios >= 2.4.0}
96 Requires: libsoup >= 2.52
97 Requires: libxmlb >= 0.1.15
98 Requires: polkit >= 0.114
99 Requires: tpm2-tss >= 2.0
103 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
105 %define fwupd_plugins_dir %{_libdir}/fwupd-%{version}
108 fwupd is a simple daemon to allow session software to update device
109 firmware on your local machine. It's designed for desktops, but this
110 project is probably quite interesting for phones, tablets and server
113 %description -l pl.UTF-8
114 fwupd to prosty demon pozwalający programom sesyjnym na aktualizację
115 firmware'u urządzeń na maszynie lokalnej. Jest zaprojektowany dla
116 komputerów osobistych, ale może być interesujący także dla telefonów,
117 tabletów i farm serwerów.
119 %package -n bash-completion-fwupd
120 Summary: Bash completion for fwupd commands
121 Summary(pl.UTF-8): Bashowe dopełnianie składni poleceń fwupd
122 Group: Applications/Shells
123 Requires: %{name} = %{version}-%{release}
124 Requires: bash-completion >= 1:2.0
127 %description -n bash-completion-fwupd
128 Bash completion for fwupd commands.
130 %description -n bash-completion-fwupd -l pl.UTF-8
131 Bashowe dopełnianie składni poleceń fwupd.
133 %package -n fish-completion-fwupd
134 Summary: Fish completion for fwupd commands
135 Summary(pl.UTF-8): Dopełnianie składni poleceń fwupd w fish
136 Group: Applications/Shells
137 Requires: %{name} = %{version}-%{release}
141 %description -n fish-completion-fwupd
142 Fish completion for fwupd commands.
144 %description -n fish-completion-fwupd -l pl.UTF-8
145 Dopełnianie składni poleceń fwupd w fish.
148 Summary: Libraries for fwupd device firmware installing daemon
149 Summary(pl.UTF-8): Biblioteki dla demona fwupd instalującego aktualizacje firmware'u
151 Requires: glib2-devel >= 1:2.55.0
152 Requires: json-glib >= 1.1.1
155 Libraries for fwupd device firmware installing daemon.
157 %description libs -l pl.UTF-8
158 Biblioteki dla demona fwupd instalującego aktualizacje firmware'u.
161 Summary: Header files for fwupd libraries
162 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek fwupd
163 Group: Development/Libraries
164 Requires: %{name}-libs = %{version}-%{release}
165 Requires: glib2-devel >= 1:2.55.0
168 Header files for fwupd libraries.
170 %description devel -l pl.UTF-8
171 Pliki nagłówkowe bibliotek fwupd.
174 Summary: Static fwupd libraries
175 Summary(pl.UTF-8): Statyczne biblioteki fwupd
176 Group: Development/Libraries
177 Requires: %{name}-devel = %{version}-%{release}
180 Static fwupd libraries.
182 %description static -l pl.UTF-8
183 Statyczne biblioteki fwupd.
186 Summary: API documentation for fwupd libraries
187 Summary(pl.UTF-8): Dokumentacja API do bibliotek fwupd
192 API documentation for fwupd libraries.
194 %description apidocs -l pl.UTF-8
195 Dokumentacja API do bibliotek fwupd.
197 %package -n vala-fwupd
198 Summary: Vala API for fwupd library
199 Summary(pl.UTF-8): API języka Vala do biblioteki fwupd
200 Group: Development/Libraries
201 Requires: %{name}-devel = %{version}-%{release}
202 Requires: vala-libsoup >= 2.52
204 %description -n vala-fwupd
205 Vala API for fwupd library.
207 %description -n vala-fwupd -l pl.UTF-8
208 API języka Vala do biblioteki fwupd.
217 -Ddocs=%{__enabled_disabled apidocs} \
219 %{!?with_dell:-Dplugin_dell=disabled} \
220 %{!?with_flashrom:-Dplugin_flashrom=disabled} \
221 %{?with_intel_spi:-Dplugin_intel_spi=true} \
222 %{!?with_modemmanager:-Dplugin_modem_manager=disabled} \
223 %{!?with_efi:-Dplugin_redfish=disabled} \
224 %{!?with_efi:-Dplugin_uefi_capsule=disabled} \
225 %{!?with_efi:-Dplugin_uefi_pk=disabled} \
228 %ninja_build -C build
231 rm -rf $RPM_BUILD_ROOT
233 %ninja_install -C build
235 for pdoc in plugins/*/README.md ; do
236 pname=$(basename $(dirname $pdoc))
237 cp -p plugins/${pname}/README.md README-${pname}.md
241 # FIXME: where to package gi-docgen generated docs?
242 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
243 %{__mv} $RPM_BUILD_ROOT%{_docdir}/*fwupd* $RPM_BUILD_ROOT%{_gtkdocdir}
249 rm -rf $RPM_BUILD_ROOT
251 %post libs -p /sbin/ldconfig
252 %postun libs -p /sbin/ldconfig
254 %files -f %{name}.lang
255 %defattr(644,root,root,755)
256 %doc AUTHORS MAINTAINERS README.md README-*.md SECURITY.md
257 %{?with_efi:%attr(755,root,root) %{_bindir}/dbxtool}
258 %attr(755,root,root) %{_bindir}/dfu-tool
259 %attr(755,root,root) %{_bindir}/fwupdagent
260 %{?with_efi:%attr(755,root,root) %{_bindir}/fwupdate}
261 %attr(755,root,root) %{_bindir}/fwupdmgr
262 %attr(755,root,root) %{_bindir}/fwupdtool
263 %dir %{_libexecdir}/fwupd
264 %attr(755,root,root) %{_libexecdir}/fwupd/fwupd
265 %attr(755,root,root) %{_libexecdir}/fwupd/fwupd-detect-cet
266 %attr(755,root,root) %{_libexecdir}/fwupd/fwupdoffline
268 %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_flashrom.so
270 %if %{with modemmanager}
271 %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_modem_manager.so
273 %dir %{_sysconfdir}/fwupd
274 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/daemon.conf
275 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/msr.conf
276 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/thunderbolt.conf
278 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/redfish.conf
279 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/uefi_capsule.conf
281 %dir %{_sysconfdir}/fwupd/remotes.d
283 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/dell-esrt.conf
285 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs.conf
286 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs-testing.conf
287 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor.conf
288 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor-directory.conf
289 #/etc/grub.d/35_fwupd
290 %dir %{_sysconfdir}/pki/fwupd
291 %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Foundation-Firmware
292 %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service
293 %{_sysconfdir}/pki/fwupd/LVFS-CA.pem
294 %dir %{_sysconfdir}/pki/fwupd-metadata
295 %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata
296 %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service
297 %{_sysconfdir}/pki/fwupd-metadata/LVFS-CA.pem
298 #/lib/modules-load.d/fwupd-msr.conf
299 %{systemdunitdir}/fwupd.service
300 %{systemdunitdir}/fwupd-offline-update.service
301 %{systemdunitdir}/fwupd-refresh.service
302 %{systemdunitdir}/fwupd-refresh.timer
303 %{systemdunitdir}/system-update.target.wants/fwupd-offline-update.service
304 /lib/systemd/system-preset/fwupd-refresh.preset
305 /lib/systemd/system-shutdown/fwupd.shutdown
306 /lib/udev/rules.d/90-fwupd-devices.rules
307 %{_datadir}/dbus-1/system.d/org.freedesktop.fwupd.conf
308 %{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service
309 %dir %{_datadir}/fwupd
310 %attr(755,root,root) %{_datadir}/fwupd/add_capsule_header.py
311 %attr(755,root,root) %{_datadir}/fwupd/firmware_packager.py
312 %attr(755,root,root) %{_datadir}/fwupd/install_dell_bios_exe.py
313 %attr(755,root,root) %{_datadir}/fwupd/simple_client.py
315 %{_datadir}/fwupd/uefi-capsule-ux.tar.xz
317 %{_datadir}/fwupd/quirks.d
318 %dir %{_datadir}/fwupd/remotes.d
320 %{_datadir}/fwupd/remotes.d/dell-esrt
322 %{_datadir}/fwupd/remotes.d/vendor
323 %{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml
324 %dir %{_datadir}/fwupd/metainfo
325 %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs-testing.metainfo.xml
326 %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs.metainfo.xml
327 %{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy
328 %{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules
329 %{_iconsdir}/hicolor/scalable/apps/org.freedesktop.fwupd.svg
330 %{?with_efi:%{_mandir}/man1/dbxtool.1*}
331 %{_mandir}/man1/dfu-tool.1*
332 %{_mandir}/man1/fwupdagent.1*
333 %{?with_efi:%{_mandir}/man1/fwupdate.1*}
334 %{_mandir}/man1/fwupdmgr.1*
335 %{_mandir}/man1/fwupdtool.1*
337 %files -n bash-completion-fwupd
338 %defattr(644,root,root,755)
339 %{bash_compdir}/fwupdagent
340 %{bash_compdir}/fwupdmgr
341 %{bash_compdir}/fwupdtool
343 %files -n fish-completion-fwupd
344 %defattr(644,root,root,755)
345 %{_datadir}/fish/vendor_completions.d/fwupdmgr.fish
348 %defattr(644,root,root,755)
349 %attr(755,root,root) %{_libdir}/libfwupd.so.*.*.*
350 %attr(755,root,root) %ghost %{_libdir}/libfwupd.so.2
351 %{_libdir}/girepository-1.0/Fwupd-2.0.typelib
352 %dir %{fwupd_plugins_dir}
353 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdengine.so
354 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdplugin.so
355 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdutil.so
358 %defattr(644,root,root,755)
359 %doc libfwupd/README.md
360 %attr(755,root,root) %{_libdir}/libfwupd.so
361 %{_includedir}/fwupd-1
362 %{_datadir}/gir-1.0/Fwupd-2.0.gir
363 %{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml
364 %{_pkgconfigdir}/fwupd.pc
367 %defattr(644,root,root,755)
368 %{_libdir}/libfwupd.a
369 %{fwupd_plugins_dir}/libfwupdengine.a
370 %{fwupd_plugins_dir}/libfwupdplugin.a
371 %{fwupd_plugins_dir}/libfwupdutil.a
375 %defattr(644,root,root,755)
377 %{_gtkdocdir}/libfwupd
378 %{_gtkdocdir}/libfwupdplugin
382 %defattr(644,root,root,755)
383 %{_datadir}/vala/vapi/fwupd.deps
384 %{_datadir}/vala/vapi/fwupd.vapi