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
115 %description -n bash-completion-fwupd
116 Bash completion for fwupd commands.
118 %description -n bash-completion-fwupd -l pl.UTF-8
119 Bashowe dopełnianie składni poleceń fwupd.
121 %package -n fish-completion-fwupd
122 Summary: Fish completion for fwupd commands
123 Summary(pl.UTF-8): Dopełnianie składni poleceń fwupd w fish
124 Group: Applications/Shells
125 Requires: %{name} = %{version}-%{release}
128 %description -n fish-completion-fwupd
129 Fish completion for fwupd commands.
131 %description -n fish-completion-fwupd -l pl.UTF-8
132 Dopełnianie składni poleceń fwupd w fish.
135 Summary: Libraries for fwupd device firmware installing daemon
136 Summary(pl.UTF-8): Biblioteki dla demona fwupd instalującego aktualizacje firmware'u
138 Requires: glib2-devel >= 1:2.55.0
139 Requires: json-glib >= 1.1.1
142 Libraries for fwupd device firmware installing daemon.
144 %description libs -l pl.UTF-8
145 Biblioteki dla demona fwupd instalującego aktualizacje firmware'u.
148 Summary: Header files for fwupd libraries
149 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek fwupd
150 Group: Development/Libraries
151 Requires: %{name}-libs = %{version}-%{release}
152 Requires: glib2-devel >= 1:2.55.0
155 Header files for fwupd libraries.
157 %description devel -l pl.UTF-8
158 Pliki nagłówkowe bibliotek fwupd.
161 Summary: Static fwupd libraries
162 Summary(pl.UTF-8): Statyczne biblioteki fwupd
163 Group: Development/Libraries
164 Requires: %{name}-devel = %{version}-%{release}
167 Static fwupd libraries.
169 %description static -l pl.UTF-8
170 Statyczne biblioteki fwupd.
173 Summary: API documentation for fwupd libraries
174 Summary(pl.UTF-8): Dokumentacja API do bibliotek fwupd
179 API documentation for fwupd libraries.
181 %description apidocs -l pl.UTF-8
182 Dokumentacja API do bibliotek fwupd.
184 %package -n vala-fwupd
185 Summary: Vala API for fwupd library
186 Summary(pl.UTF-8): API języka Vala do biblioteki fwupd
187 Group: Development/Libraries
188 Requires: %{name}-devel = %{version}-%{release}
189 Requires: vala-libsoup >= 2.52
191 %description -n vala-fwupd
192 Vala API for fwupd library.
194 %description -n vala-fwupd -l pl.UTF-8
195 API języka Vala do biblioteki fwupd.
204 -Ddocs=%{__enabled_disabled apidocs} \
206 %{!?with_efi:-Dplugin_dell=disabled} \
207 %{!?with_flashrom:-Dplugin_flashrom=disabled} \
208 -Dplugin_intel_spi=true \
209 %{!?with_modemmanager:-Dplugin_modem_manager=disabled} \
210 %{!?with_efi:-Dplugin_redfish=disabled} \
211 %{!?with_efi:-Dplugin_uefi_capsule=disabled} \
212 %{!?with_efi:-Dplugin_uefi_pk=disabled} \
215 %ninja_build -C build
218 rm -rf $RPM_BUILD_ROOT
220 %ninja_install -C build
222 for pdoc in plugins/*/README.md ; do
223 pname=$(basename $(dirname $pdoc))
224 cp -p plugins/${pname}/README.md README-${pname}.md
228 # FIXME: where to package gi-docgen generated docs?
229 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
230 %{__mv} $RPM_BUILD_ROOT%{_docdir}/*fwupd* $RPM_BUILD_ROOT%{_gtkdocdir}
236 rm -rf $RPM_BUILD_ROOT
238 %post libs -p /sbin/ldconfig
239 %postun libs -p /sbin/ldconfig
241 %files -f %{name}.lang
242 %defattr(644,root,root,755)
243 %doc AUTHORS MAINTAINERS README.md README-*.md SECURITY.md
244 %{?with_efi:%attr(755,root,root) %{_bindir}/dbxtool}
245 %attr(755,root,root) %{_bindir}/dfu-tool
246 %attr(755,root,root) %{_bindir}/fwupdagent
247 %{?with_efi:%attr(755,root,root) %{_bindir}/fwupdate}
248 %attr(755,root,root) %{_bindir}/fwupdmgr
249 %attr(755,root,root) %{_bindir}/fwupdtool
250 %dir %{_libexecdir}/fwupd
251 %attr(755,root,root) %{_libexecdir}/fwupd/fwupd
252 %attr(755,root,root) %{_libexecdir}/fwupd/fwupd-detect-cet
253 %attr(755,root,root) %{_libexecdir}/fwupd/fwupdoffline
255 %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_flashrom.so
257 %if %{with modemmanager}
258 %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_modem_manager.so
260 %dir %{_sysconfdir}/fwupd
261 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/daemon.conf
262 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/msr.conf
263 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/thunderbolt.conf
265 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/redfish.conf
266 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/uefi_capsule.conf
268 %dir %{_sysconfdir}/fwupd/remotes.d
270 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/dell-esrt.conf
272 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs.conf
273 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs-testing.conf
274 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor.conf
275 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor-directory.conf
276 #/etc/grub.d/35_fwupd
277 %dir %{_sysconfdir}/pki/fwupd
278 %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Foundation-Firmware
279 %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service
280 %{_sysconfdir}/pki/fwupd/LVFS-CA.pem
281 %dir %{_sysconfdir}/pki/fwupd-metadata
282 %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata
283 %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service
284 %{_sysconfdir}/pki/fwupd-metadata/LVFS-CA.pem
285 #/lib/modules-load.d/fwupd-msr.conf
286 %{systemdunitdir}/fwupd.service
287 %{systemdunitdir}/fwupd-offline-update.service
288 %{systemdunitdir}/fwupd-refresh.service
289 %{systemdunitdir}/fwupd-refresh.timer
290 %{systemdunitdir}/system-update.target.wants/fwupd-offline-update.service
291 /lib/systemd/system-preset/fwupd-refresh.preset
292 /lib/systemd/system-shutdown/fwupd.shutdown
293 /lib/udev/rules.d/90-fwupd-devices.rules
294 %{_datadir}/dbus-1/system.d/org.freedesktop.fwupd.conf
295 %{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service
296 %dir %{_datadir}/fwupd
297 %attr(755,root,root) %{_datadir}/fwupd/add_capsule_header.py
298 %attr(755,root,root) %{_datadir}/fwupd/firmware_packager.py
299 %attr(755,root,root) %{_datadir}/fwupd/install_dell_bios_exe.py
300 %attr(755,root,root) %{_datadir}/fwupd/simple_client.py
302 %{_datadir}/fwupd/uefi-capsule-ux.tar.xz
304 %{_datadir}/fwupd/quirks.d
305 %dir %{_datadir}/fwupd/remotes.d
307 %{_datadir}/fwupd/remotes.d/dell-esrt
309 %{_datadir}/fwupd/remotes.d/vendor
310 %{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml
311 %dir %{_datadir}/fwupd/metainfo
312 %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs-testing.metainfo.xml
313 %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs.metainfo.xml
314 %{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy
315 %{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules
316 %{_iconsdir}/hicolor/scalable/apps/org.freedesktop.fwupd.svg
317 %{?with_efi:%{_mandir}/man1/dbxtool.1*}
318 %{_mandir}/man1/dfu-tool.1*
319 %{_mandir}/man1/fwupdagent.1*
320 %{?with_efi:%{_mandir}/man1/fwupdate.1*}
321 %{_mandir}/man1/fwupdmgr.1*
322 %{_mandir}/man1/fwupdtool.1*
324 %files -n bash-completion-fwupd
325 %defattr(644,root,root,755)
326 %{bash_compdir}/fwupdagent
327 %{bash_compdir}/fwupdmgr
328 %{bash_compdir}/fwupdtool
330 %files -n fish-completion-fwupd
331 %defattr(644,root,root,755)
332 %{_datadir}/fish/vendor_completions.d/fwupdmgr.fish
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{_libdir}/libfwupd.so.*.*.*
337 %attr(755,root,root) %ghost %{_libdir}/libfwupd.so.2
338 %{_libdir}/girepository-1.0/Fwupd-2.0.typelib
339 %dir %{fwupd_plugins_dir}
340 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdengine.so
341 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdplugin.so
342 %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdutil.so
345 %defattr(644,root,root,755)
346 %doc libfwupd/README.md
347 %attr(755,root,root) %{_libdir}/libfwupd.so
348 %{_includedir}/fwupd-1
349 %{_datadir}/gir-1.0/Fwupd-2.0.gir
350 %{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml
351 %{_pkgconfigdir}/fwupd.pc
354 %defattr(644,root,root,755)
355 %{_libdir}/libfwupd.a
356 %{fwupd_plugins_dir}/libfwupdengine.a
357 %{fwupd_plugins_dir}/libfwupdplugin.a
358 %{fwupd_plugins_dir}/libfwupdutil.a
362 %defattr(644,root,root,755)
364 %{_gtkdocdir}/libfwupd
365 %{_gtkdocdir}/libfwupdplugin
369 %defattr(644,root,root,755)
370 %{_datadir}/vala/vapi/fwupd.deps
371 %{_datadir}/vala/vapi/fwupd.vapi