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