]>
Commit | Line | Data |
---|---|---|
6ffb8678 JB |
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.0 | |
5a14db0c | 9 | Release: 2 |
6ffb8678 JB |
10 | License: LGPL v2+ |
11 | Group: Base | |
12 | Source0: https://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz | |
13 | # Source0-md5: a4eb9bc295c0f1bb372e02bf091d17ad | |
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 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
90a7ae19 JB |
24 | %define efi_arch %(echo %{_target_base_arch} | sed -e 's/i386/ia32/;s/x86_64/x64/') |
25 | ||
26 | %define _enable_debug_packages 0 | |
6ffb8678 JB |
27 | |
28 | %description | |
29 | fwupd is a project to allow updating device firmware, and this package | |
30 | provides the EFI binary that is used for updating using UpdateCapsule. | |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | fwupd to projekt pozwalający uaktualniać firmware urządzeń. Ten pakiet | |
34 | dostarcza program binarny EFI służący do uaktualniania przy użyciu | |
35 | UpdateCapsule. | |
36 | ||
37 | %package devel | |
38 | Summary: Development file for fwupd-efi | |
39 | Summary(pl.UTF-8): Plik programistyczny pakietu fwupd-efi | |
40 | Group: Development/Libraries | |
41 | ||
42 | %description devel | |
43 | Development file for fwupd-efi. | |
44 | ||
45 | Plik programistyczny pakietu fwupd-efi. | |
46 | ||
47 | %prep | |
48 | %setup -q | |
49 | ||
b039779f JB |
50 | %ifarch x32 |
51 | # -m64 is needed to build x64 EFI | |
52 | %{__sed} -i -e "/^if host_cpu == 'x86_64'/,/^elif/ s/'-mno-red-zone',/& '-m64',/" efi/meson.build | |
53 | %{__sed} -i -e 's/args\.cc, /&"-m64", /' efi/generate_sbat.py | |
54 | %endif | |
55 | ||
6ffb8678 JB |
56 | %build |
57 | %meson build \ | |
58 | -Defi_sbat_distro_id="pld" \ | |
59 | -Defi_sbat_distro_summary="PLD Linux" \ | |
60 | -Defi_sbat_distro_pkgname="%{name}" \ | |
61 | -Defi_sbat_distro_version="%{version}" \ | |
62 | -Defi_sbat_distro_url="https://pld-linux.org/" \ | |
63 | ||
64 | %ninja_build -C build | |
65 | ||
66 | %install | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %ninja_install -C build | |
70 | ||
71 | %if %{with pesign} | |
72 | %pesign -s -i $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi \ | |
73 | -o $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi.tmp | |
74 | %pesign -s -i $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi.tmp \ | |
75 | -o $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi.signed | |
76 | %{__rm} $RPM_BUILD_ROOT%{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi.tmp | |
77 | %endif | |
78 | ||
79 | %clean | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %files | |
83 | %defattr(644,root,root,755) | |
84 | %doc AUTHORS COMMITMENT MAINTAINERS README.md | |
5a14db0c JR |
85 | %dir %{_libexecdir}/fwupd |
86 | %dir %{_libexecdir}/fwupd/efi | |
6ffb8678 JB |
87 | %{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi |
88 | %if %{with pesign} | |
89 | %{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi.signed | |
90 | %endif | |
91 | ||
92 | %files devel | |
93 | %defattr(644,root,root,755) | |
94 | %{_pkgconfigdir}/fwupd-efi.pc |