]> git.pld-linux.org Git - packages/efivar.git/blob - efivar.spec
73ea546a1dea877932644163445707690436577a
[packages/efivar.git] / efivar.spec
1 #
2 # Conditional build:
3 %bcond_without  static          # efivar-static binary (static version of efivar)
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:        0.24
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/releases/download/%{version}/%{name}-%{version}.tar.bz2
15 # Source0-md5:  38b6912e870e8a735e3a488e8e62d348
16 Patch0:         %{name}-static.patch
17 URL:            https://github.com/rhinstaller/efivar
18 BuildRequires:  linux-libc-headers >= 7:3.3
19 BuildRequires:  popt-devel
20 %if %{with static}
21 BuildRequires:  glibc-static
22 BuildRequires:  popt-static
23 %endif
24 Requires:       %{name}-libs = %{version}-%{release}
25 # Beside (U)EFI architectures, additionally allow x32 userspace for x86_64 boot arch
26 ExclusiveArch:  %{ix86} %{x8664} x32 arm aarch64 ia64
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
72 %setup -q
73 %patch0 -p1
74
75 %build
76 %{__make} -j1 \
77         CC="%{__cc}" \
78         CFLAGS="%{rpmcflags}" \
79         %{!?with_static:BINTARGETS=efivar} \
80         %{!?with_static_libs:STATICLIBTARGETS=} \
81         libdir=%{_libdir}
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %{__make} install \
87         DESTDIR=$RPM_BUILD_ROOT \
88         %{!?with_static:BINTARGETS=efivar} \
89         %{!?with_static_libs:STATICLIBTARGETS=} \
90         libdir=%{_libdir}
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %post   libs -p /sbin/ldconfig
96 %postun libs -p /sbin/ldconfig
97
98 %files
99 %defattr(644,root,root,755)
100 %doc README.md TODO
101 %attr(755,root,root) %{_bindir}/efivar
102 %if %{with static}
103 %attr(755,root,root) %{_bindir}/efivar-static
104 %endif
105 %{_mandir}/man1/efivar.1*
106
107 %files libs
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{_libdir}/libefiboot.so.0.*
110 %attr(755,root,root) %ghost %{_libdir}/libefiboot.so.0
111 %attr(755,root,root) %{_libdir}/libefivar.so.0.*
112 %attr(755,root,root) %ghost %{_libdir}/libefivar.so.0
113
114 %files devel
115 %defattr(644,root,root,755)
116 %attr(755,root,root) %{_libdir}/libefiboot.so
117 %attr(755,root,root) %{_libdir}/libefivar.so
118 %{_includedir}/efivar
119 %{_pkgconfigdir}/efiboot.pc
120 %{_pkgconfigdir}/efivar.pc
121 %{_mandir}/man3/efi_*.3*
122
123 %if %{with static_libs}
124 %files static
125 %defattr(644,root,root,755)
126 %{_libdir}/libefiboot.a
127 %{_libdir}/libefivar.a
128 %endif
This page took 0.044789 seconds and 2 git commands to generate.