]>
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 | |
3ccc6fe6 | 9 | Version: 36 |
1c7fbb99 | 10 | Release: 1 |
3a2f623c JB |
11 | License: LGPL v2.1 |
12 | Group: Applications/System | |
6ae92608 | 13 | #Source0Download: https://github.com/rhinstaller/efivar/releases |
e21ef51e | 14 | Source0: https://github.com/rhinstaller/efivar/releases/download/%{version}/%{name}-%{version}.tar.bz2 |
3ccc6fe6 | 15 | # Source0-md5: e98140ab7105e90059dc57a67c8c07e9 |
0297d3ec | 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 | |
d5329858 | 26 | ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 ia64 |
3a2f623c JB |
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 | |
d5329858 | 76 | %{__make} -j1 all static \ |
3a2f623c JB |
77 | CC="%{__cc}" \ |
78 | CFLAGS="%{rpmcflags}" \ | |
b5d50c2b | 79 | LDFLAGS="%{rpmldflags} -Wl,-z,muldefs" \ |
d5329858 | 80 | %{!?with_static:STATICBINTARGETS=} \ |
7d8a73df | 81 | %{!?with_static_libs:STATICLIBTARGETS=} \ |
3a2f623c JB |
82 | libdir=%{_libdir} |
83 | ||
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %{__make} install \ | |
88 | DESTDIR=$RPM_BUILD_ROOT \ | |
d5329858 | 89 | %{!?with_static:STATICBINTARGETS=} \ |
7d8a73df | 90 | %{!?with_static_libs:STATICLIBTARGETS=} \ |
3a2f623c JB |
91 | libdir=%{_libdir} |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %post libs -p /sbin/ldconfig | |
97 | %postun libs -p /sbin/ldconfig | |
98 | ||
99 | %files | |
100 | %defattr(644,root,root,755) | |
f8710baa | 101 | %doc README.md TODO |
3a2f623c | 102 | %attr(755,root,root) %{_bindir}/efivar |
6ae92608 JB |
103 | %if %{with static} |
104 | %attr(755,root,root) %{_bindir}/efivar-static | |
105 | %endif | |
3a2f623c JB |
106 | %{_mandir}/man1/efivar.1* |
107 | ||
108 | %files libs | |
109 | %defattr(644,root,root,755) | |
b5d50c2b JK |
110 | %attr(755,root,root) %{_libdir}/libefiboot.so.1.* |
111 | %attr(755,root,root) %ghost %{_libdir}/libefiboot.so.1 | |
112 | %attr(755,root,root) %{_libdir}/libefivar.so.1.* | |
113 | %attr(755,root,root) %ghost %{_libdir}/libefivar.so.1 | |
3a2f623c JB |
114 | |
115 | %files devel | |
116 | %defattr(644,root,root,755) | |
9d7df3aa | 117 | %attr(755,root,root) %{_libdir}/libefiboot.so |
3a2f623c | 118 | %attr(755,root,root) %{_libdir}/libefivar.so |
7744232a | 119 | %{_includedir}/efivar |
9d7df3aa | 120 | %{_pkgconfigdir}/efiboot.pc |
3a2f623c JB |
121 | %{_pkgconfigdir}/efivar.pc |
122 | %{_mandir}/man3/efi_*.3* | |
123 | ||
124 | %if %{with static_libs} | |
125 | %files static | |
126 | %defattr(644,root,root,755) | |
9d7df3aa | 127 | %{_libdir}/libefiboot.a |
3a2f623c JB |
128 | %{_libdir}/libefivar.a |
129 | %endif |