]> git.pld-linux.org Git - packages/fwupd.git/blame - fwupd.spec
intel spi is x86 exclusive
[packages/fwupd.git] / fwupd.spec
CommitLineData
8dceaca0
JB
1#
2# Conditional build:
328e4a1a 3%bcond_without apidocs
445379a6 4%bcond_without efi # UEFI (and dell, redfish) support
425d8043
JB
5%bcond_without flashrom # flashrom plugin
6%bcond_without modemmanager # modem_manager plugin
9d82ffc9 7%bcond_without thunderbolt # Thunderbolt support
dad21322 8
445379a6 9%ifnarch %{ix86} %{x8664} x32 %{arm} aarch64
8dceaca0
JB
10%undefine with_efi
11%endif
3bf960e6
JP
12%ifarch %{ix86} %{x8664} x32
13%define with_intel_spi 1
14%endif
8dceaca0
JB
15Summary: System daemon for installing device firmware
16Summary(pl.UTF-8): Demon systemowy do instalowania firmware'u urządzeń
17Name: fwupd
efc4a6c8 18Version: 1.8.10
6c954d9b 19Release: 1
bd3466ff 20License: LGPL v2.1+
8dceaca0 21Group: Applications/System
2a7d50df 22Source0: https://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
efc4a6c8 23# Source0-md5: bf6b6486f79732656980ba17a2087362
8dceaca0 24URL: https://github.com/hughsie/fwupd
425d8043 25%{?with_modemmanager:BuildRequires: ModemManager-devel >= 1.10.0}
a2237966 26BuildRequires: bash-completion-devel >= 1:2.0
445379a6 27%{?with_cairo:BuildRequires: cairo-devel}
6c954d9b 28BuildRequires: curl-devel >= 7.62.0
445379a6 29%{?with_efi:BuildRequires: efivar-devel >= 33}
e5466782 30# pkgconfig(libelf); can be also libelf-devel
445379a6 31BuildRequires: gcab-devel >= 1.0
efc4a6c8
JB
32# C11
33BuildRequires: gcc >= 6:4.7
e22481c9 34%ifarch x32
efc4a6c8 35BuildRequires: gcc-multilib-64 >= 6:4.7
e22481c9 36%endif
bd3466ff 37BuildRequires: gettext-tools >= 0.19.7
445379a6 38BuildRequires: glib2-devel >= 1:2.55.0
425d8043 39BuildRequires: gnutls-devel >= 3.6.0
8dceaca0 40BuildRequires: gobject-introspection-devel >= 0.9.8
efc4a6c8 41%{?with_doc:BuildRequires: gi-docgen >= 2022.2}
445379a6 42BuildRequires: json-glib-devel >= 1.1.1
91b560a2 43BuildRequires: libarchive-devel
f69ebcf4 44BuildRequires: libcbor-devel >= 0.7.0
6c954d9b 45%{?with_flashrom:BuildRequires: libflashrom-devel >= 1.2}
445379a6 46BuildRequires: libgudev-devel >= 232
6c954d9b 47BuildRequires: libgusb-devel >= 0.3.5
f69ebcf4 48BuildRequires: libjcat-devel >= 0.1.4
70eebab3
JB
49%{?with_modemmanager:BuildRequires: libmbim-devel >= 1.22.0}
50%{?with_modemmanager:BuildRequires: libqmi-devel >= 1.23.1}
425d8043 51# for dell (which requires also uefi plugin and efivar)
445379a6 52%{?with_efi:BuildRequires: libsmbios-devel >= 2.4.0}
67e55b6b 53BuildRequires: libsoup-devel >= 2.52
445379a6 54BuildRequires: libuuid-devel
efc4a6c8 55BuildRequires: libxmlb-devel >= 0.1.15
445379a6
JB
56# for <linux/nvme_ioctl.h>
57BuildRequires: linux-libc-headers >= 7:4.4
efc4a6c8 58BuildRequires: meson >= 0.61.0
579e28a9 59BuildRequires: ninja >= 1.6
8dceaca0 60BuildRequires: pkgconfig
445379a6 61BuildRequires: polkit-devel >= 0.114
d5513f57 62BuildRequires: python3 >= 1:3.0
bfd8ba8d
AM
63BuildRequires: python3-pillow
64BuildRequires: python3-pycairo
6c954d9b
JB
65BuildRequires: rpm-build >= 4.6
66BuildRequires: rpmbuild(macros) >= 1.736
8dceaca0 67BuildRequires: sqlite3-devel >= 3
efc4a6c8 68BuildRequires: systemd-devel >= 1:209
445379a6 69BuildRequires: systemd-units >= 1:211
8dceaca0 70BuildRequires: tar >= 1:1.22
d5513f57 71BuildRequires: tpm2-tss-devel >= 2.0
bd3466ff 72BuildRequires: udev-devel
445379a6 73%{?with_thunderbolt:BuildRequires: umockdev-devel}
8dceaca0 74BuildRequires: xz
6c954d9b 75BuildRequires: xz-devel
8dceaca0 76Requires: %{name}-libs = %{version}-%{release}
425d8043 77%{?with_modemmanager:BuildRequires: ModemManager-libs >= 1.10.0}
6c954d9b 78Requires: curl-libs >= 7.62.0
445379a6 79Requires: gcab >= 1.0
425d8043 80Requires: gnutls-libs >= 3.6.0
f69ebcf4 81Requires: libcbor >= 0.7.0
445379a6 82Requires: libgudev >= 232
6c954d9b 83Requires: libgusb >= 0.3.5
f69ebcf4 84Requires: libjcat >= 0.1.4
70eebab3
JB
85%{?with_modemmanager:Requires: libmbim >= 1.22.0}
86%{?with_modemmanager:Requires: libqmi >= 1.23.1}
445379a6 87%{?with_efi:Requires: libsmbios >= 2.4.0}
67e55b6b 88Requires: libsoup >= 2.52
efc4a6c8 89Requires: libxmlb >= 0.1.15
445379a6 90Requires: polkit >= 0.114
d5513f57 91Requires: tpm2-tss >= 2.0
6c954d9b
JB
92%if %{with efi}
93Suggests: fwupd-efi
94%endif
8dceaca0
JB
95BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
96
efc4a6c8 97%define fwupd_plugins_dir %{_libdir}/fwupd-%{version}
f69ebcf4 98
8dceaca0
JB
99%description
100fwupd is a simple daemon to allow session software to update device
101firmware on your local machine. It's designed for desktops, but this
102project is probably quite interesting for phones, tablets and server
103farms.
104
105%description -l pl.UTF-8
106fwupd to prosty demon pozwalający programom sesyjnym na aktualizację
107firmware'u urządzeń na maszynie lokalnej. Jest zaprojektowany dla
108komputerów osobistych, ale może być interesujący także dla telefonów,
109tabletów i farm serwerów.
110
445379a6
JB
111%package -n bash-completion-fwupd
112Summary: Bash completion for fwupd commands
113Summary(pl.UTF-8): Bashowe dopełnianie składni poleceń fwupd
114Group: Applications/Shells
115Requires: %{name} = %{version}-%{release}
a2237966 116Requires: bash-completion >= 1:2.0
1da9f11c 117BuildArch: noarch
445379a6
JB
118
119%description -n bash-completion-fwupd
120Bash completion for fwupd commands.
121
122%description -n bash-completion-fwupd -l pl.UTF-8
123Bashowe dopełnianie składni poleceń fwupd.
124
d5513f57
JB
125%package -n fish-completion-fwupd
126Summary: Fish completion for fwupd commands
127Summary(pl.UTF-8): Dopełnianie składni poleceń fwupd w fish
128Group: Applications/Shells
129Requires: %{name} = %{version}-%{release}
130Requires: fish
1da9f11c 131BuildArch: noarch
d5513f57
JB
132
133%description -n fish-completion-fwupd
134Fish completion for fwupd commands.
135
136%description -n fish-completion-fwupd -l pl.UTF-8
137Dopełnianie składni poleceń fwupd w fish.
138
8dceaca0 139%package libs
fdff42f4
JB
140Summary: Libraries for fwupd device firmware installing daemon
141Summary(pl.UTF-8): Biblioteki dla demona fwupd instalującego aktualizacje firmware'u
8dceaca0 142Group: Libraries
445379a6
JB
143Requires: glib2-devel >= 1:2.55.0
144Requires: json-glib >= 1.1.1
8dceaca0
JB
145
146%description libs
fdff42f4 147Libraries for fwupd device firmware installing daemon.
8dceaca0
JB
148
149%description libs -l pl.UTF-8
fdff42f4 150Biblioteki dla demona fwupd instalującego aktualizacje firmware'u.
8dceaca0
JB
151
152%package devel
fdff42f4
JB
153Summary: Header files for fwupd libraries
154Summary(pl.UTF-8): Pliki nagłówkowe bibliotek fwupd
8dceaca0
JB
155Group: Development/Libraries
156Requires: %{name}-libs = %{version}-%{release}
445379a6 157Requires: glib2-devel >= 1:2.55.0
8dceaca0
JB
158
159%description devel
fdff42f4 160Header files for fwupd libraries.
8dceaca0
JB
161
162%description devel -l pl.UTF-8
fdff42f4 163Pliki nagłówkowe bibliotek fwupd.
8dceaca0 164
6c954d9b
JB
165%package static
166Summary: Static fwupd libraries
167Summary(pl.UTF-8): Statyczne biblioteki fwupd
168Group: Development/Libraries
169Requires: %{name}-devel = %{version}-%{release}
170
171%description static
172Static fwupd libraries.
173
174%description static -l pl.UTF-8
175Statyczne biblioteki fwupd.
176
fdff42f4
JB
177%package apidocs
178Summary: API documentation for fwupd libraries
179Summary(pl.UTF-8): Dokumentacja API do bibliotek fwupd
180Group: Documentation
dad21322 181BuildArch: noarch
fdff42f4
JB
182
183%description apidocs
184API documentation for fwupd libraries.
185
186%description apidocs -l pl.UTF-8
187Dokumentacja API do bibliotek fwupd.
8dceaca0 188
445379a6
JB
189%package -n vala-fwupd
190Summary: Vala API for fwupd library
191Summary(pl.UTF-8): API języka Vala do biblioteki fwupd
192Group: Development/Libraries
193Requires: %{name}-devel = %{version}-%{release}
194Requires: vala-libsoup >= 2.52
195
196%description -n vala-fwupd
197Vala API for fwupd library.
198
199%description -n vala-fwupd -l pl.UTF-8
200API języka Vala do biblioteki fwupd.
201
8dceaca0
JB
202%prep
203%setup -q
204
205%build
2317379a 206%meson build \
2dde8c83 207 -Dbluez=enabled \
6c954d9b 208 -Defi_binary=false \
882dade5 209 -Ddocs=%{__enabled_disabled apidocs} \
2dde8c83
JB
210 -Dlzma=enabled \
211 %{!?with_efi:-Dplugin_dell=disabled} \
efc4a6c8 212 %{!?with_flashrom:-Dplugin_flashrom=disabled} \
3bf960e6 213 %{?with_intel_spi:-Dplugin_intel_spi=true} \
efc4a6c8 214 %{!?with_modemmanager:-Dplugin_modem_manager=disabled} \
2dde8c83 215 %{!?with_efi:-Dplugin_redfish=disabled} \
2dde8c83 216 %{!?with_efi:-Dplugin_uefi_capsule=disabled} \
efc4a6c8 217 %{!?with_efi:-Dplugin_uefi_pk=disabled} \
445379a6 218 -Dtests=false
bd3466ff 219
f6aa7e37 220%ninja_build -C build
8dceaca0
JB
221
222%install
223rm -rf $RPM_BUILD_ROOT
224
f6aa7e37 225%ninja_install -C build
8dceaca0 226
445379a6
JB
227for pdoc in plugins/*/README.md ; do
228 pname=$(basename $(dirname $pdoc))
229 cp -p plugins/${pname}/README.md README-${pname}.md
230done
231
efc4a6c8
JB
232%if %{with apidocs}
233# FIXME: where to package gi-docgen generated docs?
234install -d $RPM_BUILD_ROOT%{_gtkdocdir}
235%{__mv} $RPM_BUILD_ROOT%{_docdir}/*fwupd* $RPM_BUILD_ROOT%{_gtkdocdir}
236%endif
237
8dceaca0
JB
238%find_lang %{name}
239
240%clean
241rm -rf $RPM_BUILD_ROOT
242
243%post libs -p /sbin/ldconfig
244%postun libs -p /sbin/ldconfig
245
246%files -f %{name}.lang
247%defattr(644,root,root,755)
6c954d9b 248%doc AUTHORS MAINTAINERS README.md README-*.md SECURITY.md
e014f3a3 249%{?with_efi:%attr(755,root,root) %{_bindir}/dbxtool}
fdff42f4 250%attr(755,root,root) %{_bindir}/dfu-tool
d5513f57 251%attr(755,root,root) %{_bindir}/fwupdagent
f24e464a 252%{?with_efi:%attr(755,root,root) %{_bindir}/fwupdate}
8dceaca0 253%attr(755,root,root) %{_bindir}/fwupdmgr
d5513f57 254%attr(755,root,root) %{_bindir}/fwupdtool
445379a6
JB
255%dir %{_libexecdir}/fwupd
256%attr(755,root,root) %{_libexecdir}/fwupd/fwupd
6c954d9b 257%attr(755,root,root) %{_libexecdir}/fwupd/fwupd-detect-cet
425d8043 258%attr(755,root,root) %{_libexecdir}/fwupd/fwupdoffline
425d8043 259%if %{with flashrom}
f69ebcf4 260%attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_flashrom.so
425d8043
JB
261%endif
262%if %{with modemmanager}
f69ebcf4 263%attr(755,root,root) %{fwupd_plugins_dir}/libfu_plugin_modem_manager.so
425d8043 264%endif
bfd8ba8d
AM
265%dir %{_sysconfdir}/fwupd
266%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/daemon.conf
f69ebcf4 267%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/msr.conf
328e4a1a 268%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/thunderbolt.conf
f24e464a
JP
269%if %{with efi}
270%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/redfish.conf
6c954d9b 271%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/uefi_capsule.conf
f24e464a 272%endif
bfd8ba8d 273%dir %{_sysconfdir}/fwupd/remotes.d
425d8043
JB
274%if %{with efi}
275%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/dell-esrt.conf
276%endif
bfd8ba8d 277%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs.conf
445379a6 278%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs-testing.conf
bfd8ba8d 279%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor.conf
86752ae9 280%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor-directory.conf
70eebab3 281#/etc/grub.d/35_fwupd
f29fd781 282%dir %{_sysconfdir}/pki/fwupd
f29fd781
AM
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
70eebab3 290#/lib/modules-load.d/fwupd-msr.conf
8dceaca0 291%{systemdunitdir}/fwupd.service
a557ad5c 292%{systemdunitdir}/fwupd-offline-update.service
328e4a1a
AM
293%{systemdunitdir}/fwupd-refresh.service
294%{systemdunitdir}/fwupd-refresh.timer
a557ad5c 295%{systemdunitdir}/system-update.target.wants/fwupd-offline-update.service
328e4a1a 296/lib/systemd/system-preset/fwupd-refresh.preset
425d8043 297/lib/systemd/system-shutdown/fwupd.shutdown
91b560a2 298/lib/udev/rules.d/90-fwupd-devices.rules
328e4a1a 299%{_datadir}/dbus-1/system.d/org.freedesktop.fwupd.conf
8dceaca0 300%{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service
bfd8ba8d 301%dir %{_datadir}/fwupd
328e4a1a
AM
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
6c954d9b
JB
306%if %{with efi}
307%{_datadir}/fwupd/uefi-capsule-ux.tar.xz
308%endif
f477a3c7 309%{_datadir}/fwupd/quirks.d
bfd8ba8d 310%dir %{_datadir}/fwupd/remotes.d
425d8043
JB
311%if %{with efi}
312%{_datadir}/fwupd/remotes.d/dell-esrt
313%endif
bfd8ba8d
AM
314%{_datadir}/fwupd/remotes.d/vendor
315%{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml
f29fd781
AM
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
8dceaca0
JB
319%{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy
320%{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules
425d8043 321%{_iconsdir}/hicolor/scalable/apps/org.freedesktop.fwupd.svg
e014f3a3 322%{?with_efi:%{_mandir}/man1/dbxtool.1*}
fdff42f4 323%{_mandir}/man1/dfu-tool.1*
d5513f57 324%{_mandir}/man1/fwupdagent.1*
f24e464a 325%{?with_efi:%{_mandir}/man1/fwupdate.1*}
8dceaca0 326%{_mandir}/man1/fwupdmgr.1*
d5513f57 327%{_mandir}/man1/fwupdtool.1*
8dceaca0 328
445379a6
JB
329%files -n bash-completion-fwupd
330%defattr(644,root,root,755)
425d8043 331%{bash_compdir}/fwupdagent
445379a6
JB
332%{bash_compdir}/fwupdmgr
333%{bash_compdir}/fwupdtool
334
d5513f57
JB
335%files -n fish-completion-fwupd
336%defattr(644,root,root,755)
337%{_datadir}/fish/vendor_completions.d/fwupdmgr.fish
338
8dceaca0
JB
339%files libs
340%defattr(644,root,root,755)
341%attr(755,root,root) %{_libdir}/libfwupd.so.*.*.*
bfd8ba8d 342%attr(755,root,root) %ghost %{_libdir}/libfwupd.so.2
445379a6 343%{_libdir}/girepository-1.0/Fwupd-2.0.typelib
efc4a6c8
JB
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
8dceaca0
JB
348
349%files devel
350%defattr(644,root,root,755)
445379a6 351%doc libfwupd/README.md
8dceaca0
JB
352%attr(755,root,root) %{_libdir}/libfwupd.so
353%{_includedir}/fwupd-1
bfd8ba8d 354%{_datadir}/gir-1.0/Fwupd-2.0.gir
8dceaca0
JB
355%{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml
356%{_pkgconfigdir}/fwupd.pc
357
6c954d9b
JB
358%files static
359%defattr(644,root,root,755)
360%{_libdir}/libfwupd.a
efc4a6c8
JB
361%{fwupd_plugins_dir}/libfwupdengine.a
362%{fwupd_plugins_dir}/libfwupdplugin.a
363%{fwupd_plugins_dir}/libfwupdutil.a
6c954d9b 364
5dbae069 365%if %{with apidocs}
fdff42f4
JB
366%files apidocs
367%defattr(644,root,root,755)
328e4a1a 368%{_gtkdocdir}/fwupd
efc4a6c8
JB
369%{_gtkdocdir}/libfwupd
370%{_gtkdocdir}/libfwupdplugin
5dbae069 371%endif
f29fd781 372
445379a6
JB
373%files -n vala-fwupd
374%defattr(644,root,root,755)
375%{_datadir}/vala/vapi/fwupd.deps
376%{_datadir}/vala/vapi/fwupd.vapi
This page took 0.446367 seconds and 4 git commands to generate.