]> git.pld-linux.org Git - packages/fwupd-efi.git/blob - fwupd-efi.spec
caf5b77b145c893d12966d1da1498e0d5aaae5c8
[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.0
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:  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
24 %define         efi_arch        %(echo %{_target_base_arch} | sed -e 's/i386/ia32/;s/x86_64/x64/')
25
26 %define         _enable_debug_packages  0
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
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
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
85 %{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi
86 %if %{with pesign}
87 %{_libexecdir}/fwupd/efi/fwupd%{efi_arch}.efi.signed
88 %endif
89
90 %files devel
91 %defattr(644,root,root,755)
92 %{_pkgconfigdir}/fwupd-efi.pc
This page took 0.058493 seconds and 2 git commands to generate.