]>
Commit | Line | Data |
---|---|---|
3a2f623c JB |
1 | # |
2 | # Conditional build: | |
6ae92608 JB |
3 | %bcond_without static # efivar-static binary (static version of efivar) |
4 | %bcond_without static_libs # static libraries | |
3a2f623c JB |
5 | # |
6 | Summary: Tools to manage UEFI variables | |
7 | Summary(pl.UTF-8): Narzędzia do zarządzania zmiennymi UEFI | |
8 | Name: efivar | |
0297d3ec | 9 | Version: 0.24 |
3a2f623c JB |
10 | Release: 1 |
11 | License: LGPL v2.1 | |
12 | Group: Applications/System | |
6ae92608 JB |
13 | #Source0Download: https://github.com/rhinstaller/efivar/releases |
14 | Source0: https://github.com/rhinstaller/efivar/releases/download/%{version}/%{name}-%{version}.tar.bz2 | |
0297d3ec JB |
15 | # Source0-md5: 38b6912e870e8a735e3a488e8e62d348 |
16 | Patch0: %{name}-static.patch | |
3a2f623c | 17 | URL: https://github.com/rhinstaller/efivar |
6ae92608 | 18 | BuildRequires: linux-libc-headers >= 7:3.3 |
3a2f623c | 19 | BuildRequires: popt-devel |
6ae92608 JB |
20 | %if %{with static} |
21 | BuildRequires: glibc-static | |
22 | BuildRequires: popt-static | |
23 | %endif | |
3a2f623c JB |
24 | Requires: %{name}-libs = %{version}-%{release} |
25 | # Beside (U)EFI architectures, additionally allow x32 userspace for x86_64 boot arch | |
26 | ExclusiveArch: %{ix86} %{x8664} x32 arm aarch64 ia64 | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | efivar provides a simple command line interface to the UEFI variable | |
31 | facility. | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | efivar zapewnia prosty interfejs linii poleceń do zmiennych UEFI. | |
35 | ||
36 | %package libs | |
37 | Summary: Library to manage UEFI variables | |
38 | Summary(pl.UTF-8): Biblioteka do zarządzania zmiennymi UEFI | |
39 | Group: Libraries | |
40 | ||
41 | %description libs | |
42 | Library to manage UEFI variables. | |
43 | ||
44 | %description libs -l pl.UTF-8 | |
45 | Biblioteka do zarządzania zmiennymi UEFI. | |
46 | ||
47 | %package devel | |
48 | Summary: Header files for efivar library | |
49 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki efivar | |
50 | Group: Development/Libraries | |
51 | Requires: %{name}-libs = %{version}-%{release} | |
52 | ||
53 | %description devel | |
54 | Header files for efivar library. | |
55 | ||
56 | %description devel -l pl.UTF-8 | |
57 | Pliki nagłówkowe biblioteki efivar. | |
58 | ||
59 | %package static | |
60 | Summary: Static efivar library | |
61 | Summary(pl.UTF-8): Statyczna biblioteka efivar | |
62 | Group: Development/Libraries | |
63 | Requires: %{name}-devel = %{version}-%{release} | |
64 | ||
65 | %description static | |
66 | Static efivar library. | |
67 | ||
68 | %description static -l pl.UTF-8 | |
69 | Statyczna biblioteka efivar. | |
70 | ||
71 | %prep | |
9d7df3aa JB |
72 | %setup -q |
73 | %patch0 -p1 | |
3a2f623c JB |
74 | |
75 | %build | |
6ae92608 | 76 | %{__make} -j1 \ |
3a2f623c JB |
77 | CC="%{__cc}" \ |
78 | CFLAGS="%{rpmcflags}" \ | |
6ae92608 | 79 | %{!?with_static:BINTARGETS=efivar} \ |
7d8a73df | 80 | %{!?with_static_libs:STATICLIBTARGETS=} \ |
3a2f623c JB |
81 | libdir=%{_libdir} |
82 | ||
83 | %install | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
86 | %{__make} install \ | |
87 | DESTDIR=$RPM_BUILD_ROOT \ | |
6ae92608 | 88 | %{!?with_static:BINTARGETS=efivar} \ |
7d8a73df | 89 | %{!?with_static_libs:STATICLIBTARGETS=} \ |
3a2f623c JB |
90 | libdir=%{_libdir} |
91 | ||
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %post libs -p /sbin/ldconfig | |
96 | %postun libs -p /sbin/ldconfig | |
97 | ||
98 | %files | |
99 | %defattr(644,root,root,755) | |
f8710baa | 100 | %doc README.md TODO |
3a2f623c | 101 | %attr(755,root,root) %{_bindir}/efivar |
6ae92608 JB |
102 | %if %{with static} |
103 | %attr(755,root,root) %{_bindir}/efivar-static | |
104 | %endif | |
3a2f623c JB |
105 | %{_mandir}/man1/efivar.1* |
106 | ||
107 | %files libs | |
108 | %defattr(644,root,root,755) | |
7d8a73df JB |
109 | %attr(755,root,root) %{_libdir}/libefiboot.so.0.* |
110 | %attr(755,root,root) %ghost %{_libdir}/libefiboot.so.0 | |
111 | %attr(755,root,root) %{_libdir}/libefivar.so.0.* | |
112 | %attr(755,root,root) %ghost %{_libdir}/libefivar.so.0 | |
3a2f623c JB |
113 | |
114 | %files devel | |
115 | %defattr(644,root,root,755) | |
9d7df3aa | 116 | %attr(755,root,root) %{_libdir}/libefiboot.so |
3a2f623c | 117 | %attr(755,root,root) %{_libdir}/libefivar.so |
7744232a | 118 | %{_includedir}/efivar |
9d7df3aa | 119 | %{_pkgconfigdir}/efiboot.pc |
3a2f623c JB |
120 | %{_pkgconfigdir}/efivar.pc |
121 | %{_mandir}/man3/efi_*.3* | |
122 | ||
123 | %if %{with static_libs} | |
124 | %files static | |
125 | %defattr(644,root,root,755) | |
9d7df3aa | 126 | %{_libdir}/libefiboot.a |
3a2f623c JB |
127 | %{_libdir}/libefivar.a |
128 | %endif |