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-pycairo
72 BuildRequires: rpm-build >= 4.6
73 BuildRequires: rpmbuild(macros) >= 1.736
74 BuildRequires: sqlite3-devel >= 3
75 BuildRequires: systemd-devel >= 1:209
76 BuildRequires: systemd-units >= 1:211
77 BuildRequires: tar >= 1:1.22
78 BuildRequires: tpm2-tss-devel >= 2.0
79 BuildRequires: udev-devel
80 %{?with_thunderbolt:BuildRequires: umockdev-devel}
82 BuildRequires: xz-devel
83 Requires: %{name}-libs = %{version}-%{release}
84 %{?with_modemmanager:BuildRequires: ModemManager-libs >= 1.10.0}
85 Requires: curl-libs >= 7.62.0
87 Requires: gnutls-libs >= 3.6.0
88 Requires: libcbor >= 0.7.0
89 Requires: libgudev >= 232
90 Requires: libgusb >= 0.3.5
91 Requires: libjcat >= 0.1.4
92 %{?with_modemmanager:Requires: libmbim >= 1.22.0}
93 %{?with_modemmanager:Requires: libqmi >= 1.23.1}
94 %{?with_dell:Requires: libsmbios >= 2.4.0}
95 Requires: libsoup >= 2.52
96 Requires: libxmlb >= 0.1.15
97 Requires: polkit >= 0.114
98 Requires: tpm2-tss >= 2.0
102 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
104 %define fwupd_plugins_dir %{_libdir}/fwupd-%{version}
107 fwupd is a simple daemon to allow session software to update device
108 firmware on your local machine. It's designed for desktops, but this
109 project is probably quite interesting for phones, tablets and server
112 %description -l pl.UTF-8
113 fwupd to prosty demon pozwalający programom sesyjnym na aktualizację
114 firmware'u urządzeń na maszynie lokalnej. Jest zaprojektowany dla
115 komputerów osobistych, ale może być interesujący także dla telefonów,
116 tabletów i farm serwerów.
118 %package -n bash-completion-fwupd
119 Summary: Bash completion for fwupd commands
120 Summary(pl.UTF-8): Bashowe dopełnianie składni poleceń fwupd
121 Group: Applications/Shells
122 Requires: %{name} = %{version}-%{release}
123 Requires: bash-completion >= 1:2.0
126 %description -n bash-completion-fwupd
127 Bash completion for fwupd commands.
129 %description -n bash-completion-fwupd -l pl.UTF-8
130 Bashowe dopełnianie składni poleceń fwupd.
132 %package -n fish-completion-fwupd
133 Summary: Fish completion for fwupd commands
134 Summary(pl.UTF-8): Dopełnianie składni poleceń fwupd w fish
135 Group: Applications/Shells
136 Requires: %{name} = %{version}-%{release}
140 %description -n fish-completion-fwupd
141 Fish completion for fwupd commands.
143 %description -n fish-completion-fwupd -l pl.UTF-8
144 Dopełnianie składni poleceń fwupd w fish.
147 Summary: Libraries for fwupd device firmware installing daemon
148 Summary(pl.UTF-8): Biblioteki dla demona fwupd instalującego aktualizacje firmware'u
150 Requires: glib2-devel >= 1:2.55.0
151 Requires: json-glib >= 1.1.1
154 Libraries for fwupd device firmware installing daemon.
156 %description libs -l pl.UTF-8
157 Biblioteki dla demona fwupd instalującego aktualizacje firmware'u.
160 Summary: Header files for fwupd libraries
161 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek fwupd
162 Group: Development/Libraries
163 Requires: %{name}-libs = %{version}-%{release}
164 Requires: glib2-devel >= 1:2.55.0
167 Header files for fwupd libraries.
169 %description devel -l pl.UTF-8
170 Pliki nagłówkowe bibliotek fwupd.
173 Summary: Static fwupd libraries
174 Summary(pl.UTF-8): Statyczne biblioteki fwupd
175 Group: Development/Libraries
176 Requires: %{name}-devel = %{version}-%{release}
179 Static fwupd libraries.
181 %description static -l pl.UTF-8
182 Statyczne biblioteki fwupd.
185 Summary: API documentation for fwupd libraries
186 Summary(pl.UTF-8): Dokumentacja API do bibliotek fwupd
191 API documentation for fwupd libraries.
193 %description apidocs -l pl.UTF-8
194 Dokumentacja API do bibliotek fwupd.
196 %package -n vala-fwupd
197 Summary: Vala API for fwupd library
198 Summary(pl.UTF-8): API języka Vala do biblioteki fwupd
199 Group: Development/Libraries
200 Requires: %{name}-devel = %{version}-%{release}
201 Requires: vala-libsoup >= 2.52
203 %description -n vala-fwupd
204 Vala API for fwupd library.
206 %description -n vala-fwupd -l pl.UTF-8
207 API języka Vala do biblioteki fwupd.
216 -Ddocs=%{__enabled_disabled apidocs} \
218 %{!?with_dell:-Dplugin_dell=disabled} \
219 %{!?with_flashrom:-Dplugin_flashrom=disabled} \
220 %{?with_intel_spi:-Dplugin_intel_spi=true} \
221 %{!?with_modemmanager:-Dplugin_modem_manager=disabled} \
222 %{!?with_efi:-Dplugin_redfish=disabled} \
223 %{!?with_efi:-Dplugin_uefi_capsule=disabled} \
224 %{!?with_efi:-Dplugin_uefi_pk=disabled} \
227 %ninja_build -C build
230 rm -rf $RPM_BUILD_ROOT
232 %ninja_install -C build
234 for pdoc in plugins/*/README.md ; do
235 pname=$(basename $(dirname $pdoc))
236 cp -p plugins/${pname}/README.md README-${pname}.md
240 # FIXME: where to package gi-docgen generated docs?
241 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
242 %{__mv} $RPM_BUILD_ROOT%{_docdir}/*fwupd* $RPM_BUILD_ROOT%{_gtkdocdir}
248 rm -rf $RPM_BUILD_ROOT
250 %post libs -p /sbin/ldconfig
251 %postun libs -p /sbin/ldconfig
253 %files -f %{name}.lang
254 %defattr(644,root,root,755)
255 %doc AUTHORS MAINTAINERS README.md README-*.md SECURITY.md
256 %{?with_efi:%attr(755,root,root) %{_bindir}/dbxtool}
257 %attr(755,root,root) %{_bindir}/dfu-tool
258 %attr(755,root,root) %{_bindir}/fwupdagent
259 %{?with_efi:%attr(755,root,root) %{_bindir}/fwupdate}
260 %attr(755,root,root) %{_bindir}/fwupdmgr
261 %attr(755,root,root) %{_bindir}/fwupdtool
262 %dir %{_libexecdir}/fwupd
263 %attr(755,root,root) %{_libexecdir}/fwupd/fwupd
264 %attr(755,root,root) %{_libexecdir}/fwupd/fwupd-detect-cet
265 %attr(755,root,root) %{_libexecdir}/fwupd/fwupdoffline
267 %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_flashrom.so
269 %if %{with modemmanager}
270 %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_modem_manager.so
272 %dir %{_sysconfdir}/fwupd
273 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/daemon.conf
274 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/msr.conf
275 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/thunderbolt.conf
277 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/redfish.conf
278 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/uefi_capsule.conf
280 %dir %{_sysconfdir}/fwupd/remotes.d
282 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/dell-esrt.conf
284 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs.conf
285 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs-testing.conf
286 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor.conf
287 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor-directory.conf
288 #/etc/grub.d/35_fwupd
289 %dir %{_sysconfdir}/pki/fwupd
290 %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Foundation-Firmware
291 %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service
292 %{_sysconfdir}/pki/fwupd/LVFS-CA.pem
293 %dir %{_sysconfdir}/pki/fwupd-metadata
294 %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata
295 %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service
296 %{_sysconfdir}/pki/fwupd-metadata/LVFS-CA.pem
297 #/lib/modules-load.d/fwupd-msr.conf
298 %{systemdunitdir}/fwupd.service
299 %{systemdunitdir}/fwupd-offline-update.service
300 %{systemdunitdir}/fwupd-refresh.service
301 %{systemdunitdir}/fwupd-refresh.timer
302 %{systemdunitdir}/system-update.target.wants/fwupd-offline-update.service
303 /lib/systemd/system-preset/fwupd-refresh.preset
304 /lib/systemd/system-shutdown/fwupd.shutdown
305 /lib/udev/rules.d/90-fwupd-devices.rules
306 %{_datadir}/dbus-1/system.d/org.freedesktop.fwupd.conf
307 %{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service
308 %dir %{_datadir}/fwupd
309 %attr(755,root,root) %{_datadir}/fwupd/add_capsule_header.py
310 %attr(755,root,root) %{_datadir}/fwupd/firmware_packager.py
311 %attr(755,root,root) %{_datadir}/fwupd/install_dell_bios_exe.py
312 %attr(755,root,root) %{_datadir}/fwupd/simple_client.py
314 %{_datadir}/fwupd/uefi-capsule-ux.tar.xz
316 %{_datadir}/fwupd/quirks.d
317 %dir %{_datadir}/fwupd/remotes.d
319 %{_datadir}/fwupd/remotes.d/dell-esrt
321 %{_datadir}/fwupd/remotes.d/vendor
322 %{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml
323 %dir %{_datadir}/fwupd/metainfo
324 %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs-testing.metainfo.xml
325 %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs.metainfo.xml
326 %{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy
327 %{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules
328 %{_iconsdir}/hicolor/scalable/apps/org.freedesktop.fwupd.svg
329 %{?with_efi:%{_mandir}/man1/dbxtool.1*}
330 %{_mandir}/man1/dfu-tool.1*
331 %{_mandir}/man1/fwupdagent.1*
332 %{?with_efi:%{_mandir}/man1/fwupdate.1*}
333 %{_mandir}/man1/fwupdmgr.1*
334 %{_mandir}/man1/fwupdtool.1*
336 %files -n bash-completion-fwupd
337 %defattr(644,root,root,755)
338 %{bash_compdir}/fwupdagent
339 %{bash_compdir}/fwupdmgr
340 %{bash_compdir}/fwupdtool
342 %files -n fish-completion-fwupd
343 %defattr(644,root,root,755)
344 %{_datadir}/fish/vendor_completions.d/fwupdmgr.fish
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_libdir}/libfwupd.so.*.*.*
349 %attr(755,root,root) %ghost %{_libdir}/libfwupd.so.2
350 %{_libdir}/girepository-1.0/Fwupd-2.0.typelib
351 %dir %{fwupd_plugins_dir}
352 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdengine.so
353 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdplugin.so
354 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdutil.so
357 %defattr(644,root,root,755)
358 %doc libfwupd/README.md
359 %attr(755,root,root) %{_libdir}/libfwupd.so
360 %{_includedir}/fwupd-1
361 %{_datadir}/gir-1.0/Fwupd-2.0.gir
362 %{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml
363 %{_pkgconfigdir}/fwupd.pc
366 %defattr(644,root,root,755)
367 %{_libdir}/libfwupd.a
368 %{fwupd_plugins_dir}/libfwupdengine.a
369 %{fwupd_plugins_dir}/libfwupdplugin.a
370 %{fwupd_plugins_dir}/libfwupdutil.a
374 %defattr(644,root,root,755)
376 %{_gtkdocdir}/libfwupd
377 %{_gtkdocdir}/libfwupdplugin
381 %defattr(644,root,root,755)
382 %{_datadir}/vala/vapi/fwupd.deps
383 %{_datadir}/vala/vapi/fwupd.vapi