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