]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs | |
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 | |
9 | ||
10 | %ifnarch %{ix86} %{x8664} x32 %{arm} aarch64 | |
11 | %undefine with_efi | |
12 | %endif | |
13 | # libsmbios archs | |
14 | %ifnarch %{ix86} %{x8664} x32 | |
15 | %undefine with_dell | |
16 | %endif | |
17 | %if %{without efi} | |
18 | %undefine with_dell | |
19 | %endif | |
20 | %ifarch %{ix86} %{x8664} x32 | |
21 | %define with_intel_spi 1 | |
22 | %endif | |
23 | Summary: System daemon for installing device firmware | |
24 | Summary(pl.UTF-8): Demon systemowy do instalowania firmware'u urządzeń | |
25 | Name: fwupd | |
26 | Version: 1.8.17 | |
27 | Release: 2 | |
28 | License: LGPL v2.1+ | |
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 | |
41 | # C11 | |
42 | BuildRequires: gcc >= 6:4.7 | |
43 | %ifarch x32 | |
44 | BuildRequires: gcc-multilib-64 >= 6:4.7 | |
45 | %endif | |
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} | |
82 | BuildRequires: vala | |
83 | BuildRequires: xz | |
84 | BuildRequires: xz-devel | |
85 | # efi capsule splash (po/test-deps) | |
86 | %if %{with efi} | |
87 | # any Sans font | |
88 | BuildRequires: fonts-TTF-DejaVu | |
89 | BuildRequires: pango >= 1:1.26.0 | |
90 | BuildRequires: python3-pycairo | |
91 | BuildRequires: python3-pygobject3 | |
92 | %endif | |
93 | Requires: %{name}-libs = %{version}-%{release} | |
94 | %{?with_modemmanager:BuildRequires: ModemManager-libs >= 1.10.0} | |
95 | Requires: curl-libs >= 7.62.0 | |
96 | Requires: gcab >= 1.0 | |
97 | Requires: gnutls-libs >= 3.6.0 | |
98 | Requires: libcbor >= 0.7.0 | |
99 | Requires: libgudev >= 232 | |
100 | Requires: libgusb >= 0.3.5 | |
101 | Requires: libjcat >= 0.1.4 | |
102 | %{?with_modemmanager:Requires: libmbim >= 1.22.0} | |
103 | %{?with_modemmanager:Requires: libqmi >= 1.23.1} | |
104 | %{?with_dell:Requires: libsmbios >= 2.4.0} | |
105 | Requires: libsoup >= 2.52 | |
106 | Requires: libxmlb >= 0.1.15 | |
107 | Requires: polkit >= 0.114 | |
108 | Requires: tpm2-tss >= 2.0 | |
109 | %if %{with efi} | |
110 | Suggests: fwupd-efi | |
111 | %endif | |
112 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
113 | ||
114 | %define fwupd_plugins_dir %{_libdir}/fwupd-%{version} | |
115 | ||
116 | %description | |
117 | fwupd is a simple daemon to allow session software to update device | |
118 | firmware on your local machine. It's designed for desktops, but this | |
119 | project is probably quite interesting for phones, tablets and server | |
120 | farms. | |
121 | ||
122 | %description -l pl.UTF-8 | |
123 | fwupd to prosty demon pozwalający programom sesyjnym na aktualizację | |
124 | firmware'u urządzeń na maszynie lokalnej. Jest zaprojektowany dla | |
125 | komputerów osobistych, ale może być interesujący także dla telefonów, | |
126 | tabletów i farm serwerów. | |
127 | ||
128 | %package -n bash-completion-fwupd | |
129 | Summary: Bash completion for fwupd commands | |
130 | Summary(pl.UTF-8): Bashowe dopełnianie składni poleceń fwupd | |
131 | Group: Applications/Shells | |
132 | Requires: %{name} = %{version}-%{release} | |
133 | Requires: bash-completion >= 1:2.0 | |
134 | BuildArch: noarch | |
135 | ||
136 | %description -n bash-completion-fwupd | |
137 | Bash completion for fwupd commands. | |
138 | ||
139 | %description -n bash-completion-fwupd -l pl.UTF-8 | |
140 | Bashowe dopełnianie składni poleceń fwupd. | |
141 | ||
142 | %package -n fish-completion-fwupd | |
143 | Summary: Fish completion for fwupd commands | |
144 | Summary(pl.UTF-8): Dopełnianie składni poleceń fwupd w fish | |
145 | Group: Applications/Shells | |
146 | Requires: %{name} = %{version}-%{release} | |
147 | Requires: fish | |
148 | BuildArch: noarch | |
149 | ||
150 | %description -n fish-completion-fwupd | |
151 | Fish completion for fwupd commands. | |
152 | ||
153 | %description -n fish-completion-fwupd -l pl.UTF-8 | |
154 | Dopełnianie składni poleceń fwupd w fish. | |
155 | ||
156 | %package libs | |
157 | Summary: Libraries for fwupd device firmware installing daemon | |
158 | Summary(pl.UTF-8): Biblioteki dla demona fwupd instalującego aktualizacje firmware'u | |
159 | Group: Libraries | |
160 | Requires: glib2-devel >= 1:2.55.0 | |
161 | Requires: json-glib >= 1.1.1 | |
162 | ||
163 | %description libs | |
164 | Libraries for fwupd device firmware installing daemon. | |
165 | ||
166 | %description libs -l pl.UTF-8 | |
167 | Biblioteki dla demona fwupd instalującego aktualizacje firmware'u. | |
168 | ||
169 | %package devel | |
170 | Summary: Header files for fwupd libraries | |
171 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek fwupd | |
172 | Group: Development/Libraries | |
173 | Requires: %{name}-libs = %{version}-%{release} | |
174 | Requires: glib2-devel >= 1:2.55.0 | |
175 | ||
176 | %description devel | |
177 | Header files for fwupd libraries. | |
178 | ||
179 | %description devel -l pl.UTF-8 | |
180 | Pliki nagłówkowe bibliotek fwupd. | |
181 | ||
182 | %package static | |
183 | Summary: Static fwupd libraries | |
184 | Summary(pl.UTF-8): Statyczne biblioteki fwupd | |
185 | Group: Development/Libraries | |
186 | Requires: %{name}-devel = %{version}-%{release} | |
187 | ||
188 | %description static | |
189 | Static fwupd libraries. | |
190 | ||
191 | %description static -l pl.UTF-8 | |
192 | Statyczne biblioteki fwupd. | |
193 | ||
194 | %package apidocs | |
195 | Summary: API documentation for fwupd libraries | |
196 | Summary(pl.UTF-8): Dokumentacja API do bibliotek fwupd | |
197 | Group: Documentation | |
198 | BuildArch: noarch | |
199 | ||
200 | %description apidocs | |
201 | API documentation for fwupd libraries. | |
202 | ||
203 | %description apidocs -l pl.UTF-8 | |
204 | Dokumentacja API do bibliotek fwupd. | |
205 | ||
206 | %package -n vala-fwupd | |
207 | Summary: Vala API for fwupd library | |
208 | Summary(pl.UTF-8): API języka Vala do biblioteki fwupd | |
209 | Group: Development/Libraries | |
210 | Requires: %{name}-devel = %{version}-%{release} | |
211 | Requires: vala-libsoup >= 2.52 | |
212 | ||
213 | %description -n vala-fwupd | |
214 | Vala API for fwupd library. | |
215 | ||
216 | %description -n vala-fwupd -l pl.UTF-8 | |
217 | API języka Vala do biblioteki fwupd. | |
218 | ||
219 | %prep | |
220 | %setup -q | |
221 | ||
222 | %build | |
223 | %meson build \ | |
224 | -Dbluez=enabled \ | |
225 | -Dcompat_cli=true \ | |
226 | -Defi_binary=false \ | |
227 | -Ddocs=%{__enabled_disabled apidocs} \ | |
228 | -Dlzma=enabled \ | |
229 | %{!?with_dell:-Dplugin_dell=disabled} \ | |
230 | %{!?with_flashrom:-Dplugin_flashrom=disabled} \ | |
231 | %{?with_intel_spi:-Dplugin_intel_spi=true} \ | |
232 | %{!?with_modemmanager:-Dplugin_modem_manager=disabled} \ | |
233 | %{!?with_efi:-Dplugin_redfish=disabled} \ | |
234 | %{!?with_efi:-Dplugin_uefi_capsule=disabled} \ | |
235 | %{!?with_efi:-Dplugin_uefi_pk=disabled} \ | |
236 | -Dtests=false | |
237 | ||
238 | %ninja_build -C build | |
239 | ||
240 | %install | |
241 | rm -rf $RPM_BUILD_ROOT | |
242 | ||
243 | %ninja_install -C build | |
244 | ||
245 | for pdoc in plugins/*/README.md ; do | |
246 | pname=$(basename $(dirname $pdoc)) | |
247 | cp -p plugins/${pname}/README.md README-${pname}.md | |
248 | done | |
249 | ||
250 | %if %{with apidocs} | |
251 | install -d $RPM_BUILD_ROOT%{_gidocdir} | |
252 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/*fwupd* $RPM_BUILD_ROOT%{_gidocdir} | |
253 | %endif | |
254 | ||
255 | %find_lang %{name} | |
256 | ||
257 | %clean | |
258 | rm -rf $RPM_BUILD_ROOT | |
259 | ||
260 | %post libs -p /sbin/ldconfig | |
261 | %postun libs -p /sbin/ldconfig | |
262 | ||
263 | %files -f %{name}.lang | |
264 | %defattr(644,root,root,755) | |
265 | %doc MAINTAINERS README.md README-*.md SECURITY.md | |
266 | %{?with_efi:%attr(755,root,root) %{_bindir}/dbxtool} | |
267 | %attr(755,root,root) %{_bindir}/dfu-tool | |
268 | %attr(755,root,root) %{_bindir}/fwupdagent | |
269 | %{?with_efi:%attr(755,root,root) %{_bindir}/fwupdate} | |
270 | %attr(755,root,root) %{_bindir}/fwupdmgr | |
271 | %attr(755,root,root) %{_bindir}/fwupdtool | |
272 | %dir %{_libexecdir}/fwupd | |
273 | %attr(755,root,root) %{_libexecdir}/fwupd/fwupd | |
274 | %ifarch %{ix86} %{x8664} x32 | |
275 | %attr(755,root,root) %{_libexecdir}/fwupd/fwupd-detect-cet | |
276 | %endif | |
277 | %attr(755,root,root) %{_libexecdir}/fwupd/fwupdoffline | |
278 | %if %{with flashrom} | |
279 | %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_flashrom.so | |
280 | %endif | |
281 | %if %{with modemmanager} | |
282 | %attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_modem_manager.so | |
283 | %endif | |
284 | %dir %{_sysconfdir}/fwupd | |
285 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/daemon.conf | |
286 | %ifarch %{ix86} %{x8664} x32 | |
287 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/msr.conf | |
288 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/thunderbolt.conf | |
289 | %endif | |
290 | %if %{with efi} | |
291 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/redfish.conf | |
292 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/uefi_capsule.conf | |
293 | %endif | |
294 | %dir %{_sysconfdir}/fwupd/bios-settings.d | |
295 | %dir %{_sysconfdir}/fwupd/remotes.d | |
296 | %if %{with dell} | |
297 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/dell-esrt.conf | |
298 | %endif | |
299 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs.conf | |
300 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs-testing.conf | |
301 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor.conf | |
302 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor-directory.conf | |
303 | #/etc/grub.d/35_fwupd | |
304 | %dir %{_sysconfdir}/pki/fwupd | |
305 | %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Foundation-Firmware | |
306 | %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service | |
307 | %{_sysconfdir}/pki/fwupd/LVFS-CA.pem | |
308 | %dir %{_sysconfdir}/pki/fwupd-metadata | |
309 | %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata | |
310 | %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service | |
311 | %{_sysconfdir}/pki/fwupd-metadata/LVFS-CA.pem | |
312 | #/lib/modules-load.d/fwupd-msr.conf | |
313 | %{systemdunitdir}/fwupd.service | |
314 | %{systemdunitdir}/fwupd-offline-update.service | |
315 | %{systemdunitdir}/fwupd-refresh.service | |
316 | %{systemdunitdir}/fwupd-refresh.timer | |
317 | %{systemdunitdir}/system-update.target.wants/fwupd-offline-update.service | |
318 | /lib/systemd/system-preset/fwupd-refresh.preset | |
319 | /lib/systemd/system-shutdown/fwupd.shutdown | |
320 | /lib/udev/rules.d/90-fwupd-devices.rules | |
321 | %{_datadir}/dbus-1/system.d/org.freedesktop.fwupd.conf | |
322 | %{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service | |
323 | %dir %{_datadir}/fwupd | |
324 | %attr(755,root,root) %{_datadir}/fwupd/add_capsule_header.py | |
325 | %attr(755,root,root) %{_datadir}/fwupd/firmware_packager.py | |
326 | %attr(755,root,root) %{_datadir}/fwupd/install_dell_bios_exe.py | |
327 | %attr(755,root,root) %{_datadir}/fwupd/simple_client.py | |
328 | %if %{with efi} | |
329 | %{_datadir}/fwupd/uefi-capsule-ux.tar.xz | |
330 | %endif | |
331 | %{_datadir}/fwupd/quirks.d | |
332 | %dir %{_datadir}/fwupd/remotes.d | |
333 | %if %{with dell} | |
334 | %{_datadir}/fwupd/remotes.d/dell-esrt | |
335 | %endif | |
336 | %{_datadir}/fwupd/remotes.d/vendor | |
337 | %{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml | |
338 | %dir %{_datadir}/fwupd/metainfo | |
339 | %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs-testing.metainfo.xml | |
340 | %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs.metainfo.xml | |
341 | %{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy | |
342 | %{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules | |
343 | %{_iconsdir}/hicolor/scalable/apps/org.freedesktop.fwupd.svg | |
344 | %{?with_efi:%{_mandir}/man1/dbxtool.1*} | |
345 | %{_mandir}/man1/dfu-tool.1* | |
346 | %{_mandir}/man1/fwupdagent.1* | |
347 | %{?with_efi:%{_mandir}/man1/fwupdate.1*} | |
348 | %{_mandir}/man1/fwupdmgr.1* | |
349 | %{_mandir}/man1/fwupdtool.1* | |
350 | ||
351 | %files -n bash-completion-fwupd | |
352 | %defattr(644,root,root,755) | |
353 | %{bash_compdir}/fwupdmgr | |
354 | %{bash_compdir}/fwupdtool | |
355 | ||
356 | %files -n fish-completion-fwupd | |
357 | %defattr(644,root,root,755) | |
358 | %{_datadir}/fish/vendor_completions.d/fwupdmgr.fish | |
359 | ||
360 | %files libs | |
361 | %defattr(644,root,root,755) | |
362 | %attr(755,root,root) %{_libdir}/libfwupd.so.*.*.* | |
363 | %attr(755,root,root) %ghost %{_libdir}/libfwupd.so.2 | |
364 | %{_libdir}/girepository-1.0/Fwupd-2.0.typelib | |
365 | %dir %{fwupd_plugins_dir} | |
366 | %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdengine.so | |
367 | %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdplugin.so | |
368 | %attr(755,root,root) %{fwupd_plugins_dir}/libfwupdutil.so | |
369 | ||
370 | %files devel | |
371 | %defattr(644,root,root,755) | |
372 | %doc libfwupd/README.md | |
373 | %attr(755,root,root) %{_libdir}/libfwupd.so | |
374 | %{_includedir}/fwupd-1 | |
375 | %{_datadir}/gir-1.0/Fwupd-2.0.gir | |
376 | %{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml | |
377 | %{_pkgconfigdir}/fwupd.pc | |
378 | ||
379 | %files static | |
380 | %defattr(644,root,root,755) | |
381 | %{_libdir}/libfwupd.a | |
382 | %{fwupd_plugins_dir}/libfwupdengine.a | |
383 | %{fwupd_plugins_dir}/libfwupdplugin.a | |
384 | %{fwupd_plugins_dir}/libfwupdutil.a | |
385 | ||
386 | %if %{with apidocs} | |
387 | %files apidocs | |
388 | %defattr(644,root,root,755) | |
389 | %{_gidocdir}/fwupd | |
390 | %{_gidocdir}/libfwupd | |
391 | %{_gidocdir}/libfwupdplugin | |
392 | %endif | |
393 | ||
394 | %files -n vala-fwupd | |
395 | %defattr(644,root,root,755) | |
396 | %{_datadir}/vala/vapi/fwupd.deps | |
397 | %{_datadir}/vala/vapi/fwupd.vapi |