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 #Source0Download: https://github.com/hughsie/fwupd/releases
31 Source0: https://github.com/hughsie/fwupd/releases/download/%{version}/%{name}-%{version}.tar.xz
32 # Source0-md5: 12b5ee390019a9fbfec2733597f53ced
33 URL: https://github.com/hughsie/fwupd
34 %{?with_modemmanager:BuildRequires: ModemManager-devel >= 1.10.0}
35 BuildRequires: bash-completion-devel >= 1:2.0
36 %{?with_cairo:BuildRequires: cairo-devel}
37 BuildRequires: curl-devel >= 7.62.0
38 %{?with_efi:BuildRequires: efivar-devel >= 33}
39 # pkgconfig(libelf); can be also libelf-devel
40 BuildRequires: gcab-devel >= 1.0
42 BuildRequires: gcc >= 6:4.7
44 BuildRequires: gcc-multilib-64 >= 6:4.7
46 BuildRequires: gettext-tools >= 0.19.7
47 BuildRequires: glib2-devel >= 1:2.55.0
48 BuildRequires: gnutls-devel >= 3.6.0
49 BuildRequires: gobject-introspection-devel >= 0.9.8
50 %{?with_doc:BuildRequires: gi-docgen >= 2022.2}
51 BuildRequires: json-glib-devel >= 1.1.1
52 BuildRequires: libarchive-devel
53 BuildRequires: libcbor-devel >= 0.7.0
54 %{?with_flashrom:BuildRequires: libflashrom-devel >= 1.2}
55 BuildRequires: libgudev-devel >= 232
56 BuildRequires: libgusb-devel >= 0.3.5
57 BuildRequires: libjcat-devel >= 0.1.4
58 %{?with_modemmanager:BuildRequires: libmbim-devel >= 1.22.0}
59 %{?with_modemmanager:BuildRequires: libqmi-devel >= 1.23.1}
60 # for dell (which requires also uefi plugin and efivar)
61 %{?with_dell:BuildRequires: libsmbios-devel >= 2.4.0}
62 BuildRequires: libsoup-devel >= 2.52
63 BuildRequires: libuuid-devel
64 BuildRequires: libxmlb-devel >= 0.1.15
65 # for <linux/nvme_ioctl.h>
66 BuildRequires: linux-libc-headers >= 7:4.4
67 BuildRequires: meson >= 0.61.0
68 BuildRequires: ninja >= 1.6
69 BuildRequires: pkgconfig
70 BuildRequires: polkit-devel >= 0.114
71 BuildRequires: python3 >= 1:3.0
72 %{?with_doc:BuildRequires: python3-markdown >= 3.2}
73 BuildRequires: rpm-build >= 4.6
74 BuildRequires: rpmbuild(macros) >= 2.029
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 # efi capsule splash (po/test-deps)
87 BuildRequires: fonts-TTF-DejaVu
88 BuildRequires: pango >= 1:1.26.0
89 BuildRequires: python3-pycairo
90 BuildRequires: python3-pygobject3
92 Requires: %{name}-libs = %{version}-%{release}
93 %{?with_modemmanager:BuildRequires: ModemManager-libs >= 1.10.0}
94 Requires: curl-libs >= 7.62.0
96 Requires: gnutls-libs >= 3.6.0
97 Requires: libcbor >= 0.7.0
98 Requires: libgudev >= 232
99 Requires: libgusb >= 0.3.5
100 Requires: libjcat >= 0.1.4
101 %{?with_modemmanager:Requires: libmbim >= 1.22.0}
102 %{?with_modemmanager:Requires: libqmi >= 1.23.1}
103 %{?with_dell:Requires: libsmbios >= 2.4.0}
104 Requires: libsoup >= 2.52
105 Requires: libxmlb >= 0.1.15
106 Requires: polkit >= 0.114
107 Requires: tpm2-tss >= 2.0
111 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
113 %define fwupd_plugins_dir %{_libdir}/fwupd-%{version}
116 fwupd is a simple daemon to allow session software to update device
117 firmware on your local machine. It's designed for desktops, but this
118 project is probably quite interesting for phones, tablets and server
121 %description -l pl.UTF-8
122 fwupd to prosty demon pozwalający programom sesyjnym na aktualizację
123 firmware'u urządzeń na maszynie lokalnej. Jest zaprojektowany dla
124 komputerów osobistych, ale może być interesujący także dla telefonów,
125 tabletów i farm serwerów.
127 %package -n bash-completion-fwupd
128 Summary: Bash completion for fwupd commands
129 Summary(pl.UTF-8): Bashowe dopełnianie składni poleceń fwupd
130 Group: Applications/Shells
131 Requires: %{name} = %{version}-%{release}
132 Requires: bash-completion >= 1:2.0
135 %description -n bash-completion-fwupd
136 Bash completion for fwupd commands.
138 %description -n bash-completion-fwupd -l pl.UTF-8
139 Bashowe dopełnianie składni poleceń fwupd.
141 %package -n fish-completion-fwupd
142 Summary: Fish completion for fwupd commands
143 Summary(pl.UTF-8): Dopełnianie składni poleceń fwupd w fish
144 Group: Applications/Shells
145 Requires: %{name} = %{version}-%{release}
149 %description -n fish-completion-fwupd
150 Fish completion for fwupd commands.
152 %description -n fish-completion-fwupd -l pl.UTF-8
153 Dopełnianie składni poleceń fwupd w fish.
156 Summary: Libraries for fwupd device firmware installing daemon
157 Summary(pl.UTF-8): Biblioteki dla demona fwupd instalującego aktualizacje firmware'u
159 Requires: glib2-devel >= 1:2.55.0
160 Requires: json-glib >= 1.1.1
163 Libraries for fwupd device firmware installing daemon.
165 %description libs -l pl.UTF-8
166 Biblioteki dla demona fwupd instalującego aktualizacje firmware'u.
169 Summary: Header files for fwupd libraries
170 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek fwupd
171 Group: Development/Libraries
172 Requires: %{name}-libs = %{version}-%{release}
173 Requires: glib2-devel >= 1:2.55.0
176 Header files for fwupd libraries.
178 %description devel -l pl.UTF-8
179 Pliki nagłówkowe bibliotek fwupd.
182 Summary: Static fwupd libraries
183 Summary(pl.UTF-8): Statyczne biblioteki fwupd
184 Group: Development/Libraries
185 Requires: %{name}-devel = %{version}-%{release}
188 Static fwupd libraries.
190 %description static -l pl.UTF-8
191 Statyczne biblioteki fwupd.
194 Summary: API documentation for fwupd libraries
195 Summary(pl.UTF-8): Dokumentacja API do bibliotek fwupd
200 API documentation for fwupd libraries.
202 %description apidocs -l pl.UTF-8
203 Dokumentacja API do bibliotek fwupd.
205 %package -n vala-fwupd
206 Summary: Vala API for fwupd library
207 Summary(pl.UTF-8): API języka Vala do biblioteki fwupd
208 Group: Development/Libraries
209 Requires: %{name}-devel = %{version}-%{release}
210 Requires: vala-libsoup >= 2.52
212 %description -n vala-fwupd
213 Vala API for fwupd library.
215 %description -n vala-fwupd -l pl.UTF-8
216 API języka Vala do biblioteki fwupd.
226 -Ddocs=%{__enabled_disabled apidocs} \
228 %{!?with_dell:-Dplugin_dell=disabled} \
229 %{!?with_flashrom:-Dplugin_flashrom=disabled} \
230 %{?with_intel_spi:-Dplugin_intel_spi=true} \
231 %{!?with_modemmanager:-Dplugin_modem_manager=disabled} \
232 %{!?with_efi:-Dplugin_redfish=disabled} \
233 %{!?with_efi:-Dplugin_uefi_capsule=disabled} \
234 %{!?with_efi:-Dplugin_uefi_pk=disabled} \
237 %ninja_build -C build
240 rm -rf $RPM_BUILD_ROOT
242 %ninja_install -C build
244 for pdoc in plugins/*/README.md ; do
245 pname=$(basename $(dirname $pdoc))
246 cp -p plugins/${pname}/README.md README-${pname}.md
250 install -d $RPM_BUILD_ROOT%{_gidocdir}
251 %{__mv} $RPM_BUILD_ROOT%{_docdir}/*fwupd* $RPM_BUILD_ROOT%{_gidocdir}
257 rm -rf $RPM_BUILD_ROOT
259 %post libs -p /sbin/ldconfig
260 %postun libs -p /sbin/ldconfig
262 %files -f %{name}.lang
263 %defattr(644,root,root,755)
264 %doc MAINTAINERS README.md README-*.md SECURITY.md
265 %{?with_efi:%attr(755,root,root) %{_bindir}/dbxtool}
266 %attr(755,root,root) %{_bindir}/dfu-tool
267 %attr(755,root,root) %{_bindir}/fwupdagent
268 %{?with_efi:%attr(755,root,root) %{_bindir}/fwupdate}
269 %attr(755,root,root) %{_bindir}/fwupdmgr
270 %attr(755,root,root) %{_bindir}/fwupdtool
271 %dir %{_libexecdir}/fwupd
272 %attr(755,root,root) %{_libexecdir}/fwupd/fwupd
273 %ifarch %{ix86} %{x8664} x32
274 %attr(755,root,root) %{_libexecdir}/fwupd/fwupd-detect-cet
276 %attr(755,root,root) %{_libexecdir}/fwupd/fwupdoffline
278 %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_flashrom.so
280 %if %{with modemmanager}
281 %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_modem_manager.so
283 %dir %{_sysconfdir}/fwupd
284 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/daemon.conf
285 %ifarch %{ix86} %{x8664} x32
286 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/msr.conf
287 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/thunderbolt.conf
290 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/redfish.conf
291 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/uefi_capsule.conf
293 %dir %{_sysconfdir}/fwupd/bios-settings.d
294 %dir %{_sysconfdir}/fwupd/remotes.d
296 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/dell-esrt.conf
298 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs.conf
299 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs-testing.conf
300 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor.conf
301 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor-directory.conf
302 #/etc/grub.d/35_fwupd
303 %dir %{_sysconfdir}/pki/fwupd
304 %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Foundation-Firmware
305 %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service
306 %{_sysconfdir}/pki/fwupd/LVFS-CA.pem
307 %dir %{_sysconfdir}/pki/fwupd-metadata
308 %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata
309 %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service
310 %{_sysconfdir}/pki/fwupd-metadata/LVFS-CA.pem
311 #/lib/modules-load.d/fwupd-msr.conf
312 %{systemdunitdir}/fwupd.service
313 %{systemdunitdir}/fwupd-offline-update.service
314 %{systemdunitdir}/fwupd-refresh.service
315 %{systemdunitdir}/fwupd-refresh.timer
316 %{systemdunitdir}/system-update.target.wants/fwupd-offline-update.service
317 /lib/systemd/system-preset/fwupd-refresh.preset
318 /lib/systemd/system-shutdown/fwupd.shutdown
319 /lib/udev/rules.d/90-fwupd-devices.rules
320 %{_datadir}/dbus-1/system.d/org.freedesktop.fwupd.conf
321 %{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service
322 %dir %{_datadir}/fwupd
323 %attr(755,root,root) %{_datadir}/fwupd/add_capsule_header.py
324 %attr(755,root,root) %{_datadir}/fwupd/firmware_packager.py
325 %attr(755,root,root) %{_datadir}/fwupd/install_dell_bios_exe.py
326 %attr(755,root,root) %{_datadir}/fwupd/simple_client.py
328 %{_datadir}/fwupd/uefi-capsule-ux.tar.xz
330 %{_datadir}/fwupd/quirks.d
331 %dir %{_datadir}/fwupd/remotes.d
333 %{_datadir}/fwupd/remotes.d/dell-esrt
335 %{_datadir}/fwupd/remotes.d/vendor
336 %{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml
337 %dir %{_datadir}/fwupd/metainfo
338 %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs-testing.metainfo.xml
339 %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs.metainfo.xml
340 %{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy
341 %{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules
342 %{_iconsdir}/hicolor/scalable/apps/org.freedesktop.fwupd.svg
343 %{?with_efi:%{_mandir}/man1/dbxtool.1*}
344 %{_mandir}/man1/dfu-tool.1*
345 %{_mandir}/man1/fwupdagent.1*
346 %{?with_efi:%{_mandir}/man1/fwupdate.1*}
347 %{_mandir}/man1/fwupdmgr.1*
348 %{_mandir}/man1/fwupdtool.1*
350 %files -n bash-completion-fwupd
351 %defattr(644,root,root,755)
352 %{bash_compdir}/fwupdmgr
353 %{bash_compdir}/fwupdtool
355 %files -n fish-completion-fwupd
356 %defattr(644,root,root,755)
357 %{_datadir}/fish/vendor_completions.d/fwupdmgr.fish
360 %defattr(644,root,root,755)
361 %attr(755,root,root) %{_libdir}/libfwupd.so.*.*.*
362 %attr(755,root,root) %ghost %{_libdir}/libfwupd.so.2
363 %{_libdir}/girepository-1.0/Fwupd-2.0.typelib
364 %dir %{fwupd_plugins_dir}
365 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdengine.so
366 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdplugin.so
367 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdutil.so
370 %defattr(644,root,root,755)
371 %doc libfwupd/README.md
372 %attr(755,root,root) %{_libdir}/libfwupd.so
373 %{_includedir}/fwupd-1
374 %{_datadir}/gir-1.0/Fwupd-2.0.gir
375 %{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml
376 %{_pkgconfigdir}/fwupd.pc
379 %defattr(644,root,root,755)
380 %{_libdir}/libfwupd.a
381 %{fwupd_plugins_dir}/libfwupdengine.a
382 %{fwupd_plugins_dir}/libfwupdplugin.a
383 %{fwupd_plugins_dir}/libfwupdutil.a
387 %defattr(644,root,root,755)
389 %{_gidocdir}/libfwupd
390 %{_gidocdir}/libfwupdplugin
394 %defattr(644,root,root,755)
395 %{_datadir}/vala/vapi/fwupd.deps
396 %{_datadir}/vala/vapi/fwupd.vapi