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