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