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