]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with static # efivar-static binary (static version of efivar; broken as of 38) | |
4 | %bcond_without static_libs # static libraries | |
5 | # | |
6 | Summary: Tools to manage UEFI variables | |
7 | Summary(pl.UTF-8): Narzędzia do zarządzania zmiennymi UEFI | |
8 | Name: efivar | |
9 | Version: 39 | |
10 | Release: 1 | |
11 | License: LGPL v2.1 | |
12 | Group: Applications/System | |
13 | #Source0Download: https://github.com/rhinstaller/efivar/releases | |
14 | Source0: https://github.com/rhinstaller/efivar/archive/%{version}/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: a8fc3e79336cd6e738ab44f9bc96a5aa | |
16 | Patch0: %{name}-static.patch | |
17 | Patch1: %{name}-link.patch | |
18 | URL: https://github.com/rhinstaller/efivar | |
19 | BuildRequires: linux-libc-headers >= 7:3.3 | |
20 | BuildRequires: mandoc | |
21 | BuildRequires: popt-devel | |
22 | %if %{with static} | |
23 | BuildRequires: glibc-static | |
24 | BuildRequires: popt-static | |
25 | %endif | |
26 | Requires: %{name}-libs = %{version}-%{release} | |
27 | # Beside (U)EFI architectures, additionally allow x32 userspace for x86_64 boot arch | |
28 | ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 ia64 | |
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 | |
74 | %setup -q | |
75 | %patch0 -p1 | |
76 | %patch1 -p1 | |
77 | ||
78 | %build | |
79 | %{__make} -j1 all static \ | |
80 | CC="%{__cc}" \ | |
81 | CFLAGS="%{rpmcflags} $WFLAGS" \ | |
82 | LDFLAGS="%{rpmldflags} -Wl,-z,muldefs" \ | |
83 | %{!?with_static:STATICBINTARGETS=} \ | |
84 | %{!?with_static_libs:STATICLIBTARGETS=} \ | |
85 | LIBDIR=%{_libdir} | |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %{__make} install \ | |
91 | DESTDIR=$RPM_BUILD_ROOT \ | |
92 | %{!?with_static:STATICBINTARGETS=} \ | |
93 | %{!?with_static_libs:STATICLIBTARGETS=} \ | |
94 | LIBDIR=%{_libdir} | |
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) | |
104 | %doc README.md TODO | |
105 | %attr(755,root,root) %{_bindir}/efisecdb | |
106 | %attr(755,root,root) %{_bindir}/efivar | |
107 | %if %{with static} | |
108 | %attr(755,root,root) %{_bindir}/efivar-static | |
109 | %endif | |
110 | %{_mandir}/man1/efisecdb.1* | |
111 | %{_mandir}/man1/efivar.1* | |
112 | ||
113 | %files libs | |
114 | %defattr(644,root,root,755) | |
115 | %attr(755,root,root) %{_libdir}/libefiboot.so.1.* | |
116 | %attr(755,root,root) %ghost %{_libdir}/libefiboot.so.1 | |
117 | %attr(755,root,root) %{_libdir}/libefisec.so.1.* | |
118 | %attr(755,root,root) %ghost %{_libdir}/libefisec.so.1 | |
119 | %attr(755,root,root) %{_libdir}/libefivar.so.1.* | |
120 | %attr(755,root,root) %ghost %{_libdir}/libefivar.so.1 | |
121 | ||
122 | %files devel | |
123 | %defattr(644,root,root,755) | |
124 | %attr(755,root,root) %{_libdir}/libefiboot.so | |
125 | %attr(755,root,root) %{_libdir}/libefisec.so | |
126 | %attr(755,root,root) %{_libdir}/libefivar.so | |
127 | %{_includedir}/efivar | |
128 | %{_pkgconfigdir}/efiboot.pc | |
129 | %{_pkgconfigdir}/efisec.pc | |
130 | %{_pkgconfigdir}/efivar.pc | |
131 | %{_mandir}/man3/efi_*.3* | |
132 | ||
133 | %if %{with static_libs} | |
134 | %files static | |
135 | %defattr(644,root,root,755) | |
136 | %{_libdir}/libefiboot.a | |
137 | %{_libdir}/libefisec.a | |
138 | %{_libdir}/libefivar.a | |
139 | %endif |