]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without efi # UEFI (and dell, redfish) support | |
4 | %bcond_without flashrom # flashrom plugin | |
5 | %bcond_without modemmanager # modem_manager plugin | |
6 | %bcond_without thunderbolt # Thunderbolt support | |
7 | ||
8 | %ifnarch %{ix86} %{x8664} x32 %{arm} aarch64 | |
9 | %undefine with_efi | |
10 | %endif | |
11 | Summary: System daemon for installing device firmware | |
12 | Summary(pl.UTF-8): Demon systemowy do instalowania firmware'u urządzeń | |
13 | Name: fwupd | |
14 | Version: 1.2.10 | |
15 | Release: 1 | |
16 | License: LGPL v2.1+ | |
17 | Group: Applications/System | |
18 | Source0: https://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz | |
19 | # Source0-md5: 71e9d8c3877091c3cc8066156b9a6823 | |
20 | Patch0: %{name}-bashcomp.patch | |
21 | Patch1: %{name}-flashrom.patch | |
22 | URL: https://github.com/hughsie/fwupd | |
23 | %{?with_modemmanager:BuildRequires: ModemManager-devel >= 1.10.0} | |
24 | %{?with_cairo:BuildRequires: cairo-devel} | |
25 | BuildRequires: docbook-dtd41-sgml | |
26 | BuildRequires: docbook-utils | |
27 | %{?with_efi:BuildRequires: efivar-devel >= 33} | |
28 | # pkgconfig(libelf); can be also libelf-devel | |
29 | BuildRequires: elfutils-devel >= 0.166 | |
30 | %{?with_fontconfig:BuildRequires: fontconfig-devel} | |
31 | %{?with_fontconfig:BuildRequires: freetype-devel >= 2} | |
32 | BuildRequires: gcab-devel >= 1.0 | |
33 | # C99 | |
34 | BuildRequires: gcc >= 5:3.2 | |
35 | %ifarch x32 | |
36 | BuildRequires: gcc-multilib-64 >= 5:3.2 | |
37 | %endif | |
38 | BuildRequires: gettext-tools >= 0.19.7 | |
39 | BuildRequires: glib2-devel >= 1:2.55.0 | |
40 | %{?with_efi:BuildRequires: gnu-efi} | |
41 | BuildRequires: gnutls-devel >= 3.6.0 | |
42 | BuildRequires: gobject-introspection-devel >= 0.9.8 | |
43 | BuildRequires: gpgme-devel | |
44 | BuildRequires: gtk-doc >= 1.14 | |
45 | BuildRequires: intltool >= 0.35.0 | |
46 | BuildRequires: json-glib-devel >= 1.1.1 | |
47 | BuildRequires: libarchive-devel | |
48 | %{?with_flashrom:BuildRequires: libflashrom-devel} | |
49 | BuildRequires: libgpg-error-devel | |
50 | BuildRequires: libgudev-devel >= 232 | |
51 | BuildRequires: libgusb-devel >= 0.2.9 | |
52 | %{?with_modemmanager:BuildRequires: libqmi-devel >= 1.22.0} | |
53 | # for dell (which requires also uefi plugin and efivar) | |
54 | %{?with_efi:BuildRequires: libsmbios-devel >= 2.4.0} | |
55 | BuildRequires: libsoup-devel >= 2.52 | |
56 | BuildRequires: libuuid-devel | |
57 | BuildRequires: libxmlb-devel >= 0.1.7 | |
58 | BuildRequires: libxslt-progs | |
59 | # for <linux/nvme_ioctl.h> | |
60 | BuildRequires: linux-libc-headers >= 7:4.4 | |
61 | BuildRequires: meson >= 0.47.0 | |
62 | BuildRequires: ninja >= 1.6 | |
63 | BuildRequires: pkgconfig | |
64 | BuildRequires: polkit-devel >= 0.114 | |
65 | BuildRequires: python3-pillow | |
66 | BuildRequires: python3-pycairo | |
67 | BuildRequires: rpmbuild(macros) >= 1.726 | |
68 | BuildRequires: sqlite3-devel >= 3 | |
69 | BuildRequires: systemd-units >= 1:211 | |
70 | BuildRequires: tar >= 1:1.22 | |
71 | BuildRequires: udev-devel | |
72 | %{?with_thunderbolt:BuildRequires: umockdev-devel} | |
73 | BuildRequires: xz | |
74 | Requires: %{name}-libs = %{version}-%{release} | |
75 | %{?with_modemmanager:BuildRequires: ModemManager-libs >= 1.10.0} | |
76 | Requires: gcab >= 1.0 | |
77 | Requires: gnutls-libs >= 3.6.0 | |
78 | Requires: libgudev >= 232 | |
79 | Requires: libgusb >= 0.2.9 | |
80 | %{?with_modemmanager:Requires: libqmi >= 1.22.0} | |
81 | %{?with_efi:Requires: libsmbios >= 2.4.0} | |
82 | Requires: libsoup >= 2.52 | |
83 | Requires: libxmlb >= 0.1.7 | |
84 | Requires: polkit >= 0.114 | |
85 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
86 | ||
87 | %description | |
88 | fwupd is a simple daemon to allow session software to update device | |
89 | firmware on your local machine. It's designed for desktops, but this | |
90 | project is probably quite interesting for phones, tablets and server | |
91 | farms. | |
92 | ||
93 | %description -l pl.UTF-8 | |
94 | fwupd to prosty demon pozwalający programom sesyjnym na aktualizację | |
95 | firmware'u urządzeń na maszynie lokalnej. Jest zaprojektowany dla | |
96 | komputerów osobistych, ale może być interesujący także dla telefonów, | |
97 | tabletów i farm serwerów. | |
98 | ||
99 | %package -n bash-completion-fwupd | |
100 | Summary: Bash completion for fwupd commands | |
101 | Summary(pl.UTF-8): Bashowe dopełnianie składni poleceń fwupd | |
102 | Group: Applications/Shells | |
103 | Requires: %{name} = %{version}-%{release} | |
104 | Requires: bash-completion >= 2.0 | |
105 | ||
106 | %description -n bash-completion-fwupd | |
107 | Bash completion for fwupd commands. | |
108 | ||
109 | %description -n bash-completion-fwupd -l pl.UTF-8 | |
110 | Bashowe dopełnianie składni poleceń fwupd. | |
111 | ||
112 | %package libs | |
113 | Summary: Libraries for fwupd device firmware installing daemon | |
114 | Summary(pl.UTF-8): Biblioteki dla demona fwupd instalującego aktualizacje firmware'u | |
115 | Group: Libraries | |
116 | Requires: glib2-devel >= 1:2.55.0 | |
117 | Requires: json-glib >= 1.1.1 | |
118 | ||
119 | %description libs | |
120 | Libraries for fwupd device firmware installing daemon. | |
121 | ||
122 | %description libs -l pl.UTF-8 | |
123 | Biblioteki dla demona fwupd instalującego aktualizacje firmware'u. | |
124 | ||
125 | %package devel | |
126 | Summary: Header files for fwupd libraries | |
127 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek fwupd | |
128 | Group: Development/Libraries | |
129 | Requires: %{name}-libs = %{version}-%{release} | |
130 | Requires: glib2-devel >= 1:2.55.0 | |
131 | Obsoletes: fwupd-static | |
132 | ||
133 | %description devel | |
134 | Header files for fwupd libraries. | |
135 | ||
136 | %description devel -l pl.UTF-8 | |
137 | Pliki nagłówkowe bibliotek fwupd. | |
138 | ||
139 | %package apidocs | |
140 | Summary: API documentation for fwupd libraries | |
141 | Summary(pl.UTF-8): Dokumentacja API do bibliotek fwupd | |
142 | Group: Documentation | |
143 | %if "%{_rpmversion}" >= "5" | |
144 | BuildArch: noarch | |
145 | %endif | |
146 | ||
147 | %description apidocs | |
148 | API documentation for fwupd libraries. | |
149 | ||
150 | %description apidocs -l pl.UTF-8 | |
151 | Dokumentacja API do bibliotek fwupd. | |
152 | ||
153 | %package -n vala-fwupd | |
154 | Summary: Vala API for fwupd library | |
155 | Summary(pl.UTF-8): API języka Vala do biblioteki fwupd | |
156 | Group: Development/Libraries | |
157 | Requires: %{name}-devel = %{version}-%{release} | |
158 | Requires: vala-libsoup >= 2.52 | |
159 | ||
160 | %description -n vala-fwupd | |
161 | Vala API for fwupd library. | |
162 | ||
163 | %description -n vala-fwupd -l pl.UTF-8 | |
164 | API języka Vala do biblioteki fwupd. | |
165 | ||
166 | %prep | |
167 | %setup -q | |
168 | %patch0 -p1 | |
169 | %patch1 -p1 | |
170 | ||
171 | %ifarch x32 | |
172 | # -m64 is needed to build x64 EFI | |
173 | %{__sed} -i -e "/^if efi_arch == 'x86_64'/,/^elif/ s/'-mno-red-zone',/& '-m64',/" plugins/uefi/efi/meson.build | |
174 | %endif | |
175 | ||
176 | %build | |
177 | %meson build \ | |
178 | -Dbash_completiondir=%{bash_compdir} \ | |
179 | %{!?with_efi:-Dplugin_dell=false} \ | |
180 | %{?with_flashrom:-Dplugin_flashrom=true} \ | |
181 | %{?with_modemmanager:-Dplugin_modem_manager=true} \ | |
182 | %{!?with_efi:-Dplugin_redfish=false} \ | |
183 | %{!?with_thunderbolt:-Dplugin_thunderbolt=false} \ | |
184 | %{!?with_efi:-Dplugin_uefi=false} \ | |
185 | -Dtests=false | |
186 | ||
187 | %meson_build -C build | |
188 | ||
189 | %install | |
190 | rm -rf $RPM_BUILD_ROOT | |
191 | ||
192 | %meson_install -C build | |
193 | ||
194 | for pdoc in plugins/*/README.md ; do | |
195 | pname=$(basename $(dirname $pdoc)) | |
196 | cp -p plugins/${pname}/README.md README-${pname}.md | |
197 | done | |
198 | ||
199 | %find_lang %{name} | |
200 | ||
201 | %clean | |
202 | rm -rf $RPM_BUILD_ROOT | |
203 | ||
204 | %post libs -p /sbin/ldconfig | |
205 | %postun libs -p /sbin/ldconfig | |
206 | ||
207 | %files -f %{name}.lang | |
208 | %defattr(644,root,root,755) | |
209 | %doc AUTHORS MAINTAINERS README.md README-*.md | |
210 | %attr(755,root,root) %{_bindir}/dfu-tool | |
211 | %attr(755,root,root) %{_bindir}/fwupdmgr | |
212 | %dir %{_libexecdir}/fwupd | |
213 | %attr(755,root,root) %{_libexecdir}/fwupd/fwupd | |
214 | %attr(755,root,root) %{_libexecdir}/fwupd/fwupdagent | |
215 | %attr(755,root,root) %{_libexecdir}/fwupd/fwupdate | |
216 | %attr(755,root,root) %{_libexecdir}/fwupd/fwupdoffline | |
217 | %attr(755,root,root) %{_libexecdir}/fwupd/fwupdtool | |
218 | %dir %{_libexecdir}/fwupd/efi | |
219 | %{_libexecdir}/fwupd/efi/fwupd*.efi | |
220 | %dir %{_libdir}/fwupd-plugins-3 | |
221 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_altos.so | |
222 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_amt.so | |
223 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_ata.so | |
224 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_colorhug.so | |
225 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_csr.so | |
226 | %if %{with efi} | |
227 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_dell.so | |
228 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_dell_esrt.so | |
229 | %endif | |
230 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_dell_dock.so | |
231 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_dfu.so | |
232 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_ebitdo.so | |
233 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_fastboot.so | |
234 | %if %{with flashrom} | |
235 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_flashrom.so | |
236 | %endif | |
237 | %if %{with modemmanager} | |
238 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_modem_manager.so | |
239 | %endif | |
240 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_nitrokey.so | |
241 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_nvme.so | |
242 | %if %{with efi} | |
243 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_redfish.so | |
244 | %endif | |
245 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_rts54hid.so | |
246 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_rts54hub.so | |
247 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_steelseries.so | |
248 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_superio.so | |
249 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_synaptics_prometheus.so | |
250 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_synapticsmst.so | |
251 | %if %{with thunderbolt} | |
252 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_thunderbolt.so | |
253 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_thunderbolt_power.so | |
254 | %endif | |
255 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_udev.so | |
256 | %if %{with efi} | |
257 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_uefi.so | |
258 | %endif | |
259 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_unifying.so | |
260 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_upower.so | |
261 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_wacom_raw.so | |
262 | %attr(755,root,root) %{_libdir}/fwupd-plugins-3/libfu_plugin_wacom_usb.so | |
263 | %dir %{_sysconfdir}/fwupd | |
264 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/daemon.conf | |
265 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/redfish.conf | |
266 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/uefi.conf | |
267 | %dir %{_sysconfdir}/fwupd/remotes.d | |
268 | %if %{with efi} | |
269 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/dell-esrt.conf | |
270 | %endif | |
271 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/fwupd-tests.conf | |
272 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs.conf | |
273 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/lvfs-testing.conf | |
274 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor.conf | |
275 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fwupd/remotes.d/vendor-directory.conf | |
276 | %dir %{_sysconfdir}/pki/fwupd | |
277 | %{_sysconfdir}/pki/fwupd/GPG-KEY-Hughski-Limited | |
278 | %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Foundation-Firmware | |
279 | %{_sysconfdir}/pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service | |
280 | %{_sysconfdir}/pki/fwupd/LVFS-CA.pem | |
281 | %dir %{_sysconfdir}/pki/fwupd-metadata | |
282 | %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata | |
283 | %{_sysconfdir}/pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service | |
284 | %{_sysconfdir}/pki/fwupd-metadata/LVFS-CA.pem | |
285 | %{systemdunitdir}/fwupd.service | |
286 | %{systemdunitdir}/fwupd-offline-update.service | |
287 | %{systemdunitdir}/system-update.target.wants/fwupd-offline-update.service | |
288 | /lib/systemd/system-shutdown/fwupd.shutdown | |
289 | /lib/udev/rules.d/90-fwupd-devices.rules | |
290 | /etc/dbus-1/system.d/org.freedesktop.fwupd.conf | |
291 | %{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service | |
292 | %dir %{_datadir}/fwupd | |
293 | %attr(755,root,root) %{_datadir}/fwupd/firmware-packager | |
294 | %{_datadir}/fwupd/quirks.d | |
295 | %dir %{_datadir}/fwupd/remotes.d | |
296 | %if %{with efi} | |
297 | %{_datadir}/fwupd/remotes.d/dell-esrt | |
298 | %endif | |
299 | %{_datadir}/fwupd/remotes.d/vendor | |
300 | %{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml | |
301 | %dir %{_datadir}/fwupd/metainfo | |
302 | %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs-testing.metainfo.xml | |
303 | %{_datadir}/fwupd/metainfo/org.freedesktop.fwupd.remotes.lvfs.metainfo.xml | |
304 | %{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy | |
305 | %{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules | |
306 | %{_iconsdir}/hicolor/scalable/apps/org.freedesktop.fwupd.svg | |
307 | %lang(ca) %{_localedir}/ca/LC_IMAGES | |
308 | %lang(cs) %{_localedir}/cs/LC_IMAGES | |
309 | %lang(da) %{_localedir}/da/LC_IMAGES | |
310 | %lang(de) %{_localedir}/de/LC_IMAGES | |
311 | %lang(en) %{_localedir}/en/LC_IMAGES | |
312 | %lang(fi) %{_localedir}/fi/LC_IMAGES | |
313 | %lang(fur) %{_localedir}/fur/LC_IMAGES | |
314 | %lang(hr) %{_localedir}/hr/LC_IMAGES | |
315 | %lang(hu) %{_localedir}/hu/LC_IMAGES | |
316 | %lang(id) %{_localedir}/id/LC_IMAGES | |
317 | %lang(it) %{_localedir}/it/LC_IMAGES | |
318 | %lang(ko) %{_localedir}/ko/LC_IMAGES | |
319 | %lang(lt) %{_localedir}/lt/LC_IMAGES | |
320 | %lang(pl) %{_localedir}/pl/LC_IMAGES | |
321 | %lang(pt_BR) %{_localedir}/pt_BR/LC_IMAGES | |
322 | %lang(ru) %{_localedir}/ru/LC_IMAGES | |
323 | %lang(sr) %{_localedir}/sr/LC_IMAGES | |
324 | %lang(sv) %{_localedir}/sv/LC_IMAGES | |
325 | %lang(uk) %{_localedir}/uk/LC_IMAGES | |
326 | %lang(zh_CN) %{_localedir}/zh_CN/LC_IMAGES | |
327 | %lang(zh_TW) %{_localedir}/zh_TW/LC_IMAGES | |
328 | %dir /var/lib/fwupd | |
329 | %dir /var/lib/fwupd/builder | |
330 | /var/lib/fwupd/builder/README.md | |
331 | %{_mandir}/man1/dfu-tool.1* | |
332 | %{_mandir}/man1/fwupdmgr.1* | |
333 | ||
334 | %files -n bash-completion-fwupd | |
335 | %defattr(644,root,root,755) | |
336 | %{bash_compdir}/fwupdagent | |
337 | %{bash_compdir}/fwupdmgr | |
338 | %{bash_compdir}/fwupdtool | |
339 | ||
340 | %files libs | |
341 | %defattr(644,root,root,755) | |
342 | %attr(755,root,root) %{_libdir}/libfwupd.so.*.*.* | |
343 | %attr(755,root,root) %ghost %{_libdir}/libfwupd.so.2 | |
344 | %{_libdir}/girepository-1.0/Fwupd-2.0.typelib | |
345 | ||
346 | %files devel | |
347 | %defattr(644,root,root,755) | |
348 | %doc libfwupd/README.md | |
349 | %attr(755,root,root) %{_libdir}/libfwupd.so | |
350 | %{_includedir}/fwupd-1 | |
351 | %{_datadir}/gir-1.0/Fwupd-2.0.gir | |
352 | %{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml | |
353 | %{_pkgconfigdir}/fwupd.pc | |
354 | ||
355 | %files apidocs | |
356 | %defattr(644,root,root,755) | |
357 | %{_gtkdocdir}/libfwupd | |
358 | ||
359 | %files -n vala-fwupd | |
360 | %defattr(644,root,root,755) | |
361 | %{_datadir}/vala/vapi/fwupd.deps | |
362 | %{_datadir}/vala/vapi/fwupd.vapi |