]>
Commit | Line | Data |
---|---|---|
3b56ddd5 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with pesign # EFI apps signing with pesign | |
4 | # | |
5 | Summary: Tools to manage UEFI firmware updates | |
6 | Summary(pl.UTF-8): Narzędzia do zarządzania aktualizacjami firmware'u przez UEFI | |
7 | Name: fwupdate | |
4705c25d | 8 | Version: 12 |
bb6eacd8 | 9 | Release: 1 |
3b56ddd5 JB |
10 | License: GPL v2 |
11 | Group: Libraries | |
bb6eacd8 JB |
12 | #Source0Download: https://github.com/rhboot/fwupdate/releases |
13 | Source0: https://github.com/rhboot/fwupdate/releases/download/%{version}/%{name}-%{version}.tar.bz2 | |
4705c25d | 14 | # Source0-md5: 9cac5093836898c214f44ebe9afeaf8d |
0b1f5e39 | 15 | URL: https://github.com/rhboot/fwupdate |
bb6eacd8 JB |
16 | BuildRequires: efivar-devel >= 0.33 |
17 | BuildRequires: gnu-efi >= 3.0.5 | |
dfca3020 | 18 | BuildRequires: libsmbios-devel |
3b56ddd5 JB |
19 | %{?with_pesign:BuildRequires: pesign} |
20 | BuildRequires: popt-devel | |
21 | BuildRequires: sed >= 4.0 | |
22 | Requires: %{name}-libs = %{version}-%{release} | |
bb6eacd8 | 23 | #Requires(post): efibootmgr >= 0.13 |
dfca3020 | 24 | ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 ia64 |
3b56ddd5 JB |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %define efidir pld | |
28 | ||
29 | %description | |
30 | fwupdate provides a simple command line interface to the UEFI firmware | |
31 | updates. | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | fwupdate zapewnia prosty interfejs linii poleceń do aktualizacji | |
35 | firmware'u przez UEFI. | |
36 | ||
37 | %package libs | |
38 | Summary: Library to manage UEFI firmware updates | |
39 | Summary(pl.UTF-8): Biblioteka do zarządzania aktualizacjami firmware'u przez UEFI | |
40 | Group: Libraries | |
bb6eacd8 | 41 | Requires: efivar-libs >= 0.33 |
3b56ddd5 JB |
42 | |
43 | %description libs | |
44 | Library to manage UEFI firmware updates. | |
45 | ||
46 | %description libs -l pl.UTF-8 | |
47 | Biblioteka do zarządzania aktualizacjami firmware'u przez UEFI. | |
48 | ||
49 | %package devel | |
50 | Summary: Header files for libfwup library | |
51 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libfwup | |
52 | Group: Development/Libraries | |
53 | Requires: %{name}-libs = %{version}-%{release} | |
bb6eacd8 | 54 | Requires: efivar-devel >= 0.33 |
3b56ddd5 JB |
55 | |
56 | %description devel | |
57 | Header files for libfwup library. | |
58 | ||
59 | %description devel -l pl.UTF-8 | |
60 | Pliki nagłówkowe biblioteki libfwup. | |
61 | ||
7e7be65e JB |
62 | %package -n bash-completion-fwupdate |
63 | Summary: Bash completion for fwupdate command | |
64 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów polecenia fwupdate | |
65 | Group: Applications/Shells | |
66 | Requires: %{name} = %{version}-%{release} | |
67 | Requires: bash-completion >= 2.0 | |
68 | ||
69 | %description -n bash-completion-fwupdate | |
70 | Bash completion for fwupdate command. | |
71 | ||
72 | %description -n bash-completion-fwupdate -l pl.UTF-8 | |
73 | Bashowe uzupełnianie parametrów polecenia fwupdate. | |
74 | ||
3b56ddd5 | 75 | %prep |
a3b339a3 | 76 | %setup -q |
3b56ddd5 | 77 | |
3b56ddd5 JB |
78 | %if %{without pesign} |
79 | %{__sed} -i -e 's/pesign/cp $< $@ \&\& : &/' efi/Makefile | |
80 | %endif | |
81 | ||
dfca3020 JB |
82 | %ifarch x32 |
83 | %{__sed} -i -e '/^BUILDFLAGS\s*:= /s/:= /:= -m64 /' efi/Makefile | |
84 | %endif | |
85 | ||
3b56ddd5 | 86 | %build |
bb6eacd8 | 87 | %{__make} -j1 \ |
3b56ddd5 JB |
88 | %ifarch x32 |
89 | ARCH=x86_64 \ | |
90 | %endif | |
91 | CC="%{__cc}" \ | |
92 | CFLAGS="%{rpmcflags}" \ | |
93 | EFIDIR=%{efidir} \ | |
a3b339a3 | 94 | GNUEFIDIR=%{_libdir} \ |
7e7be65e JB |
95 | libdir=%{_libdir} \ |
96 | libexecdir=%{_libexecdir} | |
3b56ddd5 JB |
97 | |
98 | %install | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
6dee6033 | 101 | %{__make} -j1 install \ |
3b56ddd5 JB |
102 | %ifarch x32 |
103 | ARCH=x86_64 \ | |
104 | %endif | |
105 | DESTDIR=$RPM_BUILD_ROOT \ | |
106 | EFIDIR=%{efidir} \ | |
7e7be65e JB |
107 | libdir=%{_libdir} \ |
108 | libexecdir=%{_libexecdir} | |
109 | ||
110 | # fix location | |
111 | install -d $RPM_BUILD_ROOT%{systemdunitdir} | |
112 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system/*.service $RPM_BUILD_ROOT%{systemdunitdir} | |
3b56ddd5 JB |
113 | |
114 | # empty | |
115 | %{__rm} $RPM_BUILD_ROOT%{_localedir}/en/*.po | |
116 | ||
7e7be65e JB |
117 | # debuginfo installed by make install? |
118 | %{__rm} -r $RPM_BUILD_ROOT{%{_prefix}/lib/debug,%{_prefix}/src/debug} | |
119 | ||
3b56ddd5 JB |
120 | %clean |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
123 | %if 0 | |
124 | # Fedora script below - but we don't want to hardcode /dev/sda | |
125 | %post | |
126 | efibootmgr -b 1337 -B >/dev/null || : | |
127 | efibootmgr -C -b 1337 -d /dev/sda -p 1 -l /EFI/%{efidir}/fwupdate.efi -L "Firmware Update" >/dev/null || : | |
128 | %endif | |
129 | ||
130 | %post libs -p /sbin/ldconfig | |
131 | %postun libs -p /sbin/ldconfig | |
132 | ||
133 | %files | |
134 | %defattr(644,root,root,755) | |
a3b339a3 | 135 | %doc TODO |
3b56ddd5 | 136 | %attr(755,root,root) %{_bindir}/fwupdate |
7e7be65e JB |
137 | %dir %{_libexecdir}/fwupdate |
138 | %attr(755,root,root) %{_libexecdir}/fwupdate/cleanup | |
7e7be65e | 139 | %{systemdunitdir}/fwupdate-cleanup.service |
a3b339a3 | 140 | %{_mandir}/man1/fwupdate.1* |
3b56ddd5 | 141 | %dir /boot/efi/EFI/%{efidir} |
7e7be65e JB |
142 | %ifarch %{ix86} |
143 | /boot/efi/EFI/%{efidir}/fwupia32.efi | |
144 | %endif | |
145 | %ifarch %{x8664} x32 | |
146 | /boot/efi/EFI/%{efidir}/fwupx64.efi | |
147 | %endif | |
dfca3020 | 148 | %ifarch %{arm} |
7e7be65e JB |
149 | /boot/efi/EFI/%{efidir}/fwuparm.efi |
150 | %endif | |
151 | %ifarch aarch64 | |
152 | /boot/efi/EFI/%{efidir}/fwupaa64.efi | |
153 | %endif | |
dfca3020 | 154 | %ifnarch %{ix86} %{x8664} x32 %{arm} aarch64 |
3b56ddd5 | 155 | /boot/efi/EFI/%{efidir}/fwupdate.efi |
7e7be65e | 156 | %endif |
3b56ddd5 JB |
157 | %dir /boot/efi/EFI/%{efidir}/fw |
158 | ||
159 | %files libs | |
160 | %defattr(644,root,root,755) | |
7e7be65e | 161 | %attr(755,root,root) %{_libdir}/libfwup.so.*.* |
006c21b0 | 162 | %attr(755,root,root) %ghost %{_libdir}/libfwup.so.1 |
3b56ddd5 JB |
163 | |
164 | %files devel | |
165 | %defattr(644,root,root,755) | |
166 | %attr(755,root,root) %{_libdir}/libfwup.so | |
167 | %{_includedir}/fwup.h | |
006c21b0 | 168 | %{_includedir}/fwup-version.h |
3b56ddd5 | 169 | %{_pkgconfigdir}/fwup.pc |
a3b339a3 JB |
170 | %{_mandir}/man3/fwup_*.3* |
171 | %{_mandir}/man3/libfwup.3* | |
172 | %{_mandir}/man3/libfwup.h.3* | |
7e7be65e JB |
173 | |
174 | %files -n bash-completion-fwupdate | |
175 | %defattr(644,root,root,755) | |
176 | %{_datadir}/bash-completion/completions/fwupdate |