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