mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-28 18:25:54 +00:00

This also allows us to write mixed-endian structures and adds tests. As part of this commit we've also changed the API of something that's not yet been in any tarball release, so no pitchforks please.
326 lines
8.7 KiB
RPMSpec
326 lines
8.7 KiB
RPMSpec
%global glib2_version 2.45.8
|
|
%global libxmlb_version 0.1.3
|
|
%global libgusb_version 0.2.11
|
|
%global libsoup_version 2.51.92
|
|
%global systemd_version 231
|
|
%global json_glib_version 1.1.1
|
|
|
|
%define alphatag #ALPHATAG#
|
|
|
|
%global enable_ci 0
|
|
%global enable_tests 1
|
|
%global enable_dummy 1
|
|
|
|
# fwupd.efi is only available on these arches
|
|
%ifarch x86_64 aarch64
|
|
%global have_uefi 1
|
|
%endif
|
|
|
|
# redfish is only available on this arch
|
|
%ifarch x86_64
|
|
%global have_redfish 1
|
|
%endif
|
|
|
|
# libsmbios is only available on x86
|
|
%ifarch x86_64
|
|
%global have_dell 1
|
|
%endif
|
|
|
|
Summary: Firmware update daemon
|
|
Name: fwupd
|
|
Version: #VERSION#
|
|
Release: 0.#BUILD#%{?alphatag}%{?dist}
|
|
License: LGPLv2+
|
|
URL: https://github.com/hughsie/fwupd
|
|
Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
|
|
|
|
BuildRequires: gettext
|
|
BuildRequires: glib2-devel >= %{glib2_version}
|
|
BuildRequires: libxmlb-devel >= %{libxmlb_version}
|
|
BuildRequires: libgcab1-devel
|
|
BuildRequires: libgudev1-devel
|
|
BuildRequires: libgusb-devel >= %{libgusb_version}
|
|
BuildRequires: libsoup-devel >= %{libsoup_version}
|
|
BuildRequires: polkit-devel >= 0.103
|
|
BuildRequires: sqlite-devel
|
|
BuildRequires: gpgme-devel
|
|
BuildRequires: systemd >= %{systemd_version}
|
|
BuildRequires: libarchive-devel
|
|
BuildRequires: gobject-introspection-devel
|
|
BuildRequires: gcab
|
|
%ifarch %{valgrind_arches}
|
|
BuildRequires: valgrind
|
|
BuildRequires: valgrind-devel
|
|
%endif
|
|
BuildRequires: elfutils-libelf-devel
|
|
BuildRequires: gtk-doc
|
|
BuildRequires: gnutls-devel
|
|
BuildRequires: gnutls-utils
|
|
BuildRequires: meson
|
|
BuildRequires: help2man
|
|
BuildRequires: json-glib-devel >= %{json_glib_version}
|
|
BuildRequires: vala
|
|
BuildRequires: bash-completion
|
|
|
|
%if 0%{?have_redfish}
|
|
BuildRequires: efivar-devel >= 33
|
|
%endif
|
|
|
|
%if 0%{?have_uefi}
|
|
BuildRequires: efivar-devel >= 33
|
|
BuildRequires: python3 python3-cairo python3-gobject python3-pillow
|
|
BuildRequires: pango-devel
|
|
BuildRequires: cairo-devel cairo-gobject-devel
|
|
BuildRequires: freetype
|
|
BuildRequires: fontconfig
|
|
BuildRequires: google-noto-sans-cjk-ttc-fonts
|
|
BuildRequires: gnu-efi-devel
|
|
BuildRequires: pesign
|
|
%endif
|
|
|
|
%if 0%{?have_dell}
|
|
BuildRequires: efivar-devel >= 33
|
|
BuildRequires: libsmbios-devel >= 2.3.0
|
|
%endif
|
|
|
|
Requires(post): systemd
|
|
Requires(preun): systemd
|
|
Requires(postun): systemd
|
|
|
|
Requires: glib2%{?_isa} >= %{glib2_version}
|
|
Requires: libxmlb%{?_isa} >= %{libxmlb_version}
|
|
Requires: libgusb%{?_isa} >= %{libgusb_version}
|
|
Requires: libsoup%{?_isa} >= %{libsoup_version}
|
|
Requires: bubblewrap
|
|
Requires: shared-mime-info
|
|
|
|
Recommends: python3
|
|
Recommends: tpm2-tools tpm2-abrmd
|
|
|
|
Obsoletes: fwupd-sign < 0.1.6
|
|
Obsoletes: libebitdo < 0.7.5-3
|
|
Obsoletes: libdfu < 1.0.0
|
|
Obsoletes: fwupd-labels < 1.1.0-1
|
|
|
|
%description
|
|
fwupd is a daemon to allow session software to update device firmware.
|
|
|
|
%package devel
|
|
Summary: Development package for %{name}
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
Obsoletes: libebitdo-devel < 0.7.5-3
|
|
Obsoletes: libdfu-devel < 1.0.0
|
|
|
|
%description devel
|
|
Files for development with %{name}.
|
|
|
|
%package tests
|
|
Summary: Data files for installed tests
|
|
BuildArch: noarch
|
|
|
|
%description tests
|
|
Data files for installed tests.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
|
|
%meson \
|
|
%if 0%{?enable_ci}
|
|
--werror \
|
|
%endif
|
|
-Dgtkdoc=true \
|
|
%if 0%{?enable_tests}
|
|
-Dtests=true \
|
|
%else
|
|
-Dtests=false \
|
|
%endif
|
|
%if 0%{?enable_dummy}
|
|
-Dplugin_dummy=true \
|
|
%else
|
|
-Dplugin_dummy=false \
|
|
%endif
|
|
-Dplugin_thunderbolt=true \
|
|
%if 0%{?have_redfish}
|
|
-Dplugin_redfish=true \
|
|
%else
|
|
-Dplugin_redfish=false \
|
|
%endif
|
|
%if 0%{?have_uefi}
|
|
-Dplugin_uefi=true \
|
|
-Dplugin_nvme=true \
|
|
%else
|
|
-Dplugin_uefi=false \
|
|
-Dplugin_nvme=false \
|
|
%endif
|
|
%if 0%{?have_dell}
|
|
-Dplugin_dell=true \
|
|
-Dplugin_synaptics=true \
|
|
%else
|
|
-Dplugin_dell=false \
|
|
-Dplugin_synaptics=false \
|
|
%endif
|
|
-Dman=true
|
|
|
|
%meson_build
|
|
|
|
%if 0%{?enable_tests}
|
|
%check
|
|
%meson_test
|
|
%endif
|
|
|
|
%install
|
|
%meson_install
|
|
|
|
# sign fwupd.efi loader
|
|
%if 0%{?have_uefi}
|
|
%ifarch x86_64
|
|
%global efiarch x64
|
|
%endif
|
|
%ifarch aarch64
|
|
%global efiarch aa64
|
|
%endif
|
|
%global fwup_efi_fn $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efiarch}.efi
|
|
%pesign -s -i %{fwup_efi_fn} -o %{fwup_efi_fn}.signed
|
|
%endif
|
|
|
|
mkdir -p --mode=0700 $RPM_BUILD_ROOT%{_localstatedir}/lib/fwupd/gnupg
|
|
|
|
%find_lang %{name}
|
|
|
|
%post
|
|
/sbin/ldconfig
|
|
%systemd_post fwupd.service
|
|
|
|
%preun
|
|
%systemd_preun fwupd.service
|
|
|
|
%postun
|
|
/sbin/ldconfig
|
|
%systemd_postun_with_restart fwupd.service
|
|
%systemd_postun_with_restart pesign.service
|
|
|
|
%files -f %{name}.lang
|
|
%doc README.md AUTHORS
|
|
%license COPYING
|
|
%config(noreplace)%{_sysconfdir}/fwupd/daemon.conf
|
|
%if 0%{?have_uefi}
|
|
%config(noreplace)%{_sysconfdir}/fwupd/uefi.conf
|
|
%endif
|
|
%if 0%{?have_redfish}
|
|
%config(noreplace)%{_sysconfdir}/fwupd/redfish.conf
|
|
%endif
|
|
%dir %{_libexecdir}/fwupd
|
|
%{_libexecdir}/fwupd/fwupd
|
|
%{_libexecdir}/fwupd/fwupdtool
|
|
%if 0%{?have_uefi}
|
|
%{_libexecdir}/fwupd/efi/*.efi
|
|
%{_libexecdir}/fwupd/efi/*.efi.signed
|
|
%{_libexecdir}/fwupd/fwupdate
|
|
%endif
|
|
%{_bindir}/dfu-tool
|
|
%{_bindir}/fwupdmgr
|
|
%dir %{_sysconfdir}/fwupd
|
|
%dir %{_sysconfdir}/fwupd/remotes.d
|
|
%config(noreplace)%{_sysconfdir}/fwupd/remotes.d/fwupd.conf
|
|
%config(noreplace)%{_sysconfdir}/fwupd/remotes.d/lvfs.conf
|
|
%config(noreplace)%{_sysconfdir}/fwupd/remotes.d/lvfs-testing.conf
|
|
%config(noreplace)%{_sysconfdir}/fwupd/remotes.d/vendor.conf
|
|
%config(noreplace)%{_sysconfdir}/fwupd/remotes.d/vendor-directory.conf
|
|
%config(noreplace)%{_sysconfdir}/pki/fwupd
|
|
%{_sysconfdir}/pki/fwupd-metadata
|
|
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.fwupd.conf
|
|
%{_datadir}/bash-completion/completions/fwupdmgr
|
|
%{_datadir}/bash-completion/completions/fwupdtool
|
|
%{_datadir}/fwupd/metainfo/org.freedesktop.fwupd*.metainfo.xml
|
|
%{_datadir}/fwupd/remotes.d/fwupd/metadata.xml
|
|
%{_datadir}/fwupd/remotes.d/vendor/firmware/README.md
|
|
%{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml
|
|
%{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy
|
|
%{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules
|
|
%{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service
|
|
%{_datadir}/man/man1/dfu-tool.1.gz
|
|
%{_datadir}/man/man1/fwupdmgr.1.gz
|
|
%{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml
|
|
%{_datadir}/fwupd/firmware-packager
|
|
%{_unitdir}/fwupd-offline-update.service
|
|
%{_unitdir}/fwupd.service
|
|
%{_unitdir}/system-update.target.wants/
|
|
%dir %{_localstatedir}/lib/fwupd
|
|
%dir %{_datadir}/fwupd/quirks.d
|
|
%{_datadir}/fwupd/quirks.d/*.quirk
|
|
%{_localstatedir}/lib/fwupd/builder/README.md
|
|
%{_libdir}/libfwupd*.so.*
|
|
%{_libdir}/girepository-1.0/Fwupd-2.0.typelib
|
|
/usr/lib/udev/rules.d/*.rules
|
|
%dir %{_libdir}/fwupd-plugins-3
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_altos.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_amt.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_ata.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_colorhug.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_csr.so
|
|
%if 0%{?have_dell}
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_dell.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_dell_esrt.so
|
|
%endif
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_dell_dock.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_dfu.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_ebitdo.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_fastboot.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_flashrom.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_nitrokey.so
|
|
%if 0%{?have_uefi}
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_nvme.so
|
|
%endif
|
|
%if 0%{?have_redfish}
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_redfish.so
|
|
%endif
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_rts54hid.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_rts54hub.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_steelseries.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_superio.so
|
|
%if 0%{?have_dell}
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_synapticsmst.so
|
|
%endif
|
|
%if 0%{?enable_dummy}
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_test.so
|
|
%endif
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_thunderbolt.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_thunderbolt_power.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_udev.so
|
|
%if 0%{?have_uefi}
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_uefi.so
|
|
%endif
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_unifying.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_upower.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_wacom_raw.so
|
|
%{_libdir}/fwupd-plugins-3/libfu_plugin_wacom_usb.so
|
|
%ghost %{_localstatedir}/lib/fwupd/gnupg
|
|
%if 0%{?have_uefi}
|
|
%{_datadir}/locale/*/LC_IMAGES/fwupd*
|
|
%endif
|
|
|
|
%files devel
|
|
%{_datadir}/gir-1.0/Fwupd-2.0.gir
|
|
%{_datadir}/gtk-doc/html/libfwupd
|
|
%{_datadir}/vala/vapi
|
|
%{_includedir}/fwupd-1
|
|
%{_libdir}/libfwupd*.so
|
|
%{_libdir}/pkgconfig/fwupd.pc
|
|
|
|
%files tests
|
|
%dir %{_datadir}/installed-tests/fwupd
|
|
%{_datadir}/installed-tests/fwupd/fwupd-tests.xml
|
|
%{_datadir}/installed-tests/fwupd/*.test
|
|
%{_datadir}/installed-tests/fwupd/*.cab
|
|
%{_datadir}/installed-tests/fwupd/*.sh
|
|
%{_datadir}/installed-tests/fwupd/*.py*
|
|
%dir %{_sysconfdir}/fwupd/remotes.d
|
|
%config(noreplace)%{_sysconfdir}/fwupd/remotes.d/fwupd-tests.conf
|
|
|
|
%changelog
|
|
* #LONGDATE# Richard Hughes <richard@hughsie.com> #VERSION#-0.#BUILD##ALPHATAG#
|
|
- Update from git
|
|
|