]> git.pld-linux.org Git - packages/fwupd-efi.git/blob - fwupd-efi.spec
- updated to 1.4
[packages/fwupd-efi.git] / fwupd-efi.spec
1 #
2 # Conditional build:
3 %bcond_with     pesign  # sign EFI binary (pesign is NFY)
4
5 Summary:        Firmware update EFI binaries
6 Summary(pl.UTF-8):      Binaria EFI do uaktualniania firmware'u
7 Name:           fwupd-efi
8 Version:        1.2
9 Release:        1
10 License:        LGPL v2+
11 Group:          Base
12 Source0:        https://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
13 # Source0-md5:  bb0ff8cb127d665e19e587701f6af3ed
14 URL:            https://github.com/fwupd/fwupd-efi
15 BuildRequires:  gnu-efi
16 BuildRequires:  meson >= 0.53.0
17 BuildRequires:  ninja >= 1.5
18 %{?with_pesign:BuildRequires:   pesign}
19 BuildRequires:  tar >= 1:1.22
20 BuildRequires:  xz
21 Requires:       fwupd >= 1.6.0
22 ExclusiveArch:  %{ix86} %{x8664} x32 %{arm} aarch64
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         efi_arch        %(echo %{_target_base_arch} | sed -e 's/i386/ia32/;s/x86_64/x64/')
26
27 %define         _enable_debug_packages  0
28
29 %description
30 fwupd is a project to allow updating device firmware, and this package
31 provides the EFI binary that is used for updating using UpdateCapsule.
32
33 %description -l pl.UTF-8
34 fwupd to projekt pozwalający uaktualniać firmware urządzeń. Ten pakiet
35 dostarcza program binarny EFI służący do uaktualniania przy użyciu
36 UpdateCapsule.
37
38 %package devel
39 Summary:        Development file for fwupd-efi
40 Summary(pl.UTF-8):      Plik programistyczny pakietu fwupd-efi
41 Group:          Development/Libraries
42
43 %description devel
44 Development file for fwupd-efi.
45
46 Plik programistyczny pakietu fwupd-efi.
47
48 %prep
49 %setup -q
50
51 %ifarch x32
52 # -m64 is needed to build x64 EFI
53 %{__sed} -i -e "/^if host_cpu == 'x86_64'/,/^elif/ s/'-mno-red-zone',/& '-m64',/" efi/meson.build
54 %{__sed} -i -e 's/args\.cc, /&"-m64", /' efi/generate_sbat.py
55 %endif
56
57 %build
58 %meson build \
59         -Defi_sbat_distro_id="pld" \
60         -Defi_sbat_distro_summary="PLD Linux" \
61         -Defi_sbat_distro_pkgname="%{name}" \
62         -Defi_sbat_distro_version="%{version}" \
63         -Defi_sbat_distro_url="https://pld-linux.org/" \
64
65 %ninja_build -C build
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69
70 %ninja_install -C build
71
72 %if %{with pesign}
73 %pesign -s -i $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi \
74         -o $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi.tmp
75 %pesign -s -i $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi.tmp \
76         -o $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi.signed
77 %{__rm} $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi.tmp
78 %endif
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %files
84 %defattr(644,root,root,755)
85 %doc AUTHORS COMMITMENT MAINTAINERS README.md
86 %dir %{_libexecdir}/fwupd
87 %dir %{_libexecdir}/fwupd/efi
88 %{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi
89 %if %{with pesign}
90 %{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi.signed
91 %endif
92
93 %files devel
94 %defattr(644,root,root,755)
95 %{_pkgconfigdir}/fwupd-efi.pc
This page took 0.133001 seconds and 3 git commands to generate.