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