2 # - BASH command-not-found functionality disabled for now as it needs patched bash
3 # (details in bash from Fedora Rawhide)
6 %bcond_without doc # build without docs
7 %bcond_without introspection # gobject introspection, time to time broken
8 %bcond_without static_libs # static library
9 %bcond_without python # Python binding (used by entropy and portage backends)
10 %bcond_without vala # Vala binding
12 %bcond_with alpm # ALPM (Arch Linux package manager) backend
13 %bcond_with apt # APT (Debian/Ubuntu) backend using C++ API
14 %bcond_with dnf # DNF (Fedora/RHEL) backend
15 %bcond_with entropy # Entropy (Sabayon) backend (Python)
16 %bcond_with nix # Nix (NixOS) backend [broken as of 1.2.0]
17 %bcond_without poldek # Poldek (PLD) backend
18 %bcond_with portage # portage (Gentoo) backend (Python)
19 %bcond_with slack # Slack (Slackware) backend
20 %bcond_with zypp # ZYPP (openSUSE/SLE) backend [broken as of 1.2.0]
23 %undefine with_entropy
24 %undefine with_portage
27 Summary: System daemon that is a D-Bus abstraction layer for package management
28 Summary(pl.UTF-8): Demon systemowy będący warstwą abstrakcji D-Bus do zarządzania pakietami
33 Group: Applications/System
34 Source0: https://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
35 # Source0-md5: 2bfa2687bcc4e189bb90e2228c11e558
36 Patch0: %{name}-poldek.patch
37 Patch2: %{name}-meson.patch
38 Patch3: consolekit-fallback.patch
39 URL: https://www.freedesktop.org/software/PackageKit/
40 %{?with_apt:BuildRequires: AppStream-devel >= 0.11}
41 BuildRequires: NetworkManager-devel >= 0.6.5
42 # pkgconfig(libalpm) >= 12.0.0
43 %{?with_alpm:BuildRequires: alpm-devel >= 5.2}
44 %{?with_dnf:BuildRequires: appstream-glib-devel}
45 %{?with_apt:BuildRequires: apt-devel >= 1.7}
46 BuildRequires: bash-completion-devel >= 2.0
47 BuildRequires: connman-devel
48 %{?with_slack:BuildRequires: curl-devel}
49 BuildRequires: dbus-devel >= 1.2.0
50 BuildRequires: dbus-glib-devel >= 0.76
51 BuildRequires: docbook-dtd412-xml
52 BuildRequires: docbook-dtd42-xml
53 BuildRequires: fontconfig-devel
54 BuildRequires: gettext-tools
55 BuildRequires: glib2-devel >= 1:2.54.0
56 %{?with_introspection:BuildRequires: gobject-introspection-devel >= 0.9.9}
57 BuildRequires: gstreamer-devel >= 1.0.0
58 BuildRequires: gstreamer-plugins-base-devel >= 1.0.0
59 BuildRequires: gtk+3-devel >= 3.0.0
60 %{?with_doc:BuildRequires: gtk-doc >= 1.11}
61 BuildRequires: libarchive-devel
62 %{?with_dnf:BuildRequires: libdnf-devel >= 0.43.1}
63 %if %{with apt} || %{with nix}
64 BuildRequires: libstdc++-devel >= 6:4.7
66 %{?with_slack:BuildRequires: libstdc++-devel >= 6:5}
67 BuildRequires: libxslt-progs
68 %{?with_zypp:BuildRequires: libzypp-devel >= 15}
69 BuildRequires: meson >= 0.50
70 BuildRequires: ninja >= 1.5
71 # nix-expr nix-main nix-store
72 %{?with_nix:BuildRequires: nix-devel >= 1.12}
73 BuildRequires: pango-devel
74 BuildRequires: pkgconfig
75 # just to detect which reboot modes to use (library not linked)
76 #BuildRequires: plymouth-devel >= 0.9.5
77 %{?with_poldek:BuildRequires: poldek-devel >= 0.30-1.rc6.4}
78 BuildRequires: polkit-devel >= 0.114
80 %{?with_python:BuildRequires: python-devel >= 1:2.7}
81 BuildRequires: readline-devel
82 BuildRequires: rpm-build >= 4.6
83 %{?with_dnf:BuildRequires: rpm-devel >= 4.?}
84 BuildRequires: rpm-pythonprov
85 BuildRequires: rpmbuild(macros) >= 1.736
86 BuildRequires: sed >= 4.0
87 BuildRequires: sqlite3-devel >= 3
88 BuildRequires: systemd-devel >= 1:213
89 BuildRequires: tar >= 1:1.22
90 BuildRequires: udev-glib-devel
91 %{?with_vala:BuildRequires: vala >= 2:0.16}
93 Requires(post,postun): shared-mime-info
94 Requires: %{name}-backend
95 Requires: %{name}-libs = %{version}-%{release}
97 Requires: polkit >= 0.114
98 Suggests: ConsoleKit-x11
99 Obsoletes: PackageKit-backend-pisi < 1.2
100 Obsoletes: PackageKit-backend-ports < 1.2
101 Obsoletes: PackageKit-backend-smart < 1.0
102 Obsoletes: PackageKit-backend-urpmi < 1.2
103 Obsoletes: PackageKit-backend-yum < 1.2
104 Obsoletes: PackageKit-docs < 0.8.4
105 Obsoletes: pm-utils-packagekit < 0.8.15
106 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
109 PackageKit is a D-Bus abstraction layer that allows the session user
110 to manage packages in a secure way using a cross-distro,
111 cross-architecture API.
113 %description -l pl.UTF-8
114 PackageKit to warstwa abstrakcji D-Bus pozwalająca użytkownikowi
115 sesyjnemu w bezpieczny sposob zarządzać pakietami przy użyciu API
116 zgodnego z wieloma dystrybucjami i architekturami.
119 Summary: packagekit-glib library
120 Summary(pl.UTF-8): Biblioteka packagekit-glib
122 Requires: glib2 >= 1:2.54.0
123 Obsoletes: browser-plugin-packagekit < 1.1.0
126 packagekit-glib library.
128 %description libs -l pl.UTF-8
129 Biblioteka packagekit-glib.
132 Summary: Header files for packagekit-glib library
133 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki packagekit-glib
134 Group: Development/Libraries
135 Requires: %{name}-libs = %{version}-%{release}
136 Requires: dbus-devel >= 1.2.0
137 Requires: glib2-devel >= 1:2.54.0
138 Requires: sqlite3-devel
141 Header files for packagekit-glib library.
143 %description devel -l pl.UTF-8
144 Pliki nagłówkowe biblioteki packagekit-glib.
147 Summary: Static packagekit-glib library
148 Summary(pl.UTF-8): Statyczna biblioteka packagekit-glib
149 Group: Development/Libraries
150 Requires: %{name}-devel = %{version}-%{release}
153 Static packagekit-glib library.
155 %description static -l pl.UTF-8
156 Statyczna biblioteka packagekit-glib.
158 %package -n vala-packagekit
159 Summary: Vala API for PackageKit library
160 Summary(pl.UTF-8): API języka Vala do biblioteki PackageKitu
161 Group: Development/Libraries
162 Requires: %{name}-devel = %{version}-%{release}
163 Requires: vala >= 2:0.16
166 %description -n vala-packagekit
167 Vala API for PackageKit library.
169 %description -n vala-packagekit -l pl.UTF-8
170 API języka Vala do biblioteki PackageKitu.
173 Summary: PackageKit library API documentation
174 Summary(pl.UTF-8): Dokumentacja API biblioteki PackageKit
176 Requires: gtk-doc-common
180 PackageKit library API documentation.
182 %description apidocs -l pl.UTF-8
183 Dokumentacja API biblioteki PackageKit.
185 %package backend-alpm
186 Summary: PackageKit ALPM backend
187 Summary(pl.UTF-8): Backend PackageKit oparty na bibliotece ALPM
189 Requires: %{name} = %{version}-%{release}
190 Provides: %{name}-backend = %{version}-%{release}
192 %description backend-alpm
193 A backend for PackageKit to enable Arch Linux packages via ALPM
196 %description backend-alpm -l pl.UTF-8
197 Backend PackageKit dodający obsługę pakietów Arch Linuksa poprzez
200 %package backend-aptcc
201 Summary: PackageKit APTcc backend
202 Summary(pl.UTF-8): Backend PackageKit APTcc
204 Requires: %{name} = %{version}-%{release}
205 Requires: AppStream >= 0.11
206 Provides: %{name}-backend = %{version}-%{release}
208 %description backend-aptcc
209 A backend for PackageKit to enable APT support via C++ API.
211 %description backend-aptcc -l pl.UTF-8
212 Backend PackageKit dodający obsługę zarządcy pakietów APT poprzez API
216 Summary: PackageKit dnf backend
217 Summary(pl.UTF-8): Backend PackageKit oparty na bibliotece dnfhif
219 Requires: %{name} = %{version}-%{release}
220 Provides: %{name}-backend = %{version}-%{release}
221 Obsoletes: PackageKit-backend-hawkey < 1.0
222 Obsoletes: PackageKit-backend-hif < 1.2
224 %description backend-dnf
225 A backend for PackageKit to enable RPM packages support via dnf
226 library (used in Fedora).
228 %description backend-dnf -l pl.UTF-8
229 Backend PackageKit dodający obsługę pakietów RPM poprzez bibliotekę
230 dnf (używaną w dystrybucji Fedora).
232 %package backend-entropy
233 Summary: PackageKit Entropy backend
234 Summary(pl.UTF-8): Backend PackageKit Entropy
236 Requires: %{name} = %{version}-%{release}
237 Requires: python-packagekit = %{version}-%{release}
238 #Requires: python-entropy
239 Provides: %{name}-backend = %{version}-%{release}
241 %description backend-entropy
242 A backend for PackageKit to enable Sabayon packages support through
243 Entropy package manager.
245 %description backend-entropy -l pl.UTF-8
246 Backend PackageKit dodający obsługę pakietów dystrybucji Sabayon przy
247 użyciu zarządcy pakietów Entropy.
250 Summary: PackageKit Nix backend
251 Summary(pl.UTF-8): Backend PackageKit oparty na zarządcy pakietów Nix
253 Requires: %{name} = %{version}-%{release}
254 Requires: nix >= 1.12
255 Provides: %{name}-backend = %{version}-%{release}
257 %description backend-nix
258 A backend for PackageKit to enable Nix packages support (used in
261 %description backend-nix -l pl.UTF-8
262 Backend PackageKit dodający obsługę pakietów Nix (używanych w NixOS).
264 %package backend-poldek
265 Summary: PackageKit Poldek backend
266 Summary(pl.UTF-8): Backend PackageKit oparty na Poldku
268 Requires: %{name} = %{version}-%{release}
269 Requires: poldek >= 0.30-1.rc6.4
270 Provides: %{name}-backend = %{version}-%{release}
272 %description backend-poldek
273 A backend for PackageKit to enable RPM packages support through Poldek
274 - native PLD package manager.
276 %description backend-poldek -l pl.UTF-8
277 Backend PackageKit dodający obsługę pakietów RPM poprzez Poldka -
278 natywnego zarządcę pakietów dystrybucji PLD.
280 %package backend-portage
281 Summary: PackageKit Portage backend
282 Summary(pl.UTF-8): Backend PackageKit Portage
284 Requires: %{name} = %{version}-%{release}
285 Requires: python-packagekit = %{version}-%{release}
286 #Requires: python-portage
287 Provides: %{name}-backend = %{version}-%{release}
289 %description backend-portage
290 A backend for PackageKit to enable Gentoo Portage support.
292 %description backend-portage -l pl.UTF-8
293 Backend PackageKit dodający obsługę systemu Portage dystrybucji
296 %package backend-slack
297 Summary: PackageKit Slack backend
298 Summary(pl.UTF-8): Backend PackageKit Slack
300 Requires: %{name} = %{version}-%{release}
301 Provides: %{name}-backend = %{version}-%{release}
302 Obsoletes: PackageKit-backend-katja < 1.2
304 %description backend-slack
305 Slack backend for PackageKit to enable Slackware repositories support.
307 %description backend-slack -l pl.UTF-8
308 Backend PackageKit Slack dodający obsługę repozytoriów Slackware.
310 %package backend-zypp
311 Summary: PackageKit Zypp backend
312 Summary(pl.UTF-8): Backend PackageKit Zypp
314 Requires: %{name} = %{version}-%{release}
315 Requires: libzypp >= 15
316 Provides: %{name}-backend = %{version}-%{release}
318 %description backend-zypp
319 A backend for PackageKit to enable RPM packages support through Zypp
320 library (originated in openSUSE/SLE).
322 %description backend-zypp -l pl.UTF-8
323 Backend PackageKit dodający obsługę pakietów RPM poprzez bibliotekę
324 Zypp (pochodzącą z dystrybucji openSUSE/SLE).
326 %package gstreamer-plugin
327 Summary: GStreamer codecs installer
328 Summary(pl.UTF-8): Instalator kodeków GStreamera
330 Requires: %{name} = %{version}-%{release}
331 Requires: %{name}-gtk3-module = %{version}-%{release}
333 %description gstreamer-plugin
334 The PackageKit GStreamer plugin allows any GStreamer application to
335 install codecs from configured repositories using PackageKit.
337 %description gstreamer-plugin -l pl.UTF-8
338 Wtyczka GStreamer pozwala każdej aplikacji używającej GStreamera
339 zainstalować kodeki ze skonfigurowanych źródeł PackageKit.
342 Summary: GTK+ 3.x module to detect and install missing fonts
343 Summary(pl.UTF-8): Moduł GTK+ 3.x do wykrywania i instalowania brakujących czcionek
345 Obsoletes: PackageKit-gtk-module < 1.2.0
347 %description gtk3-module
348 The PackageKit GTK+ 3.x module allows any pango application to install
349 missing fonts from configured repositories using PackageKit.
351 %description gtk3-module -l pl.UTF-8
352 Moduł GTK+ 3.x pozwala każdej aplikacji używającej pango zainstalować
353 brakującą czcionkę ze skonfigurowanych źródeł PackageKit.
355 %package -n bash-completion-packagekit
356 Summary: Bash completion for PackageKit console commands
357 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla poleceń konsolowych PackageKit
358 Group: Applications/Shells
359 Requires: %{name} = %{version}-%{release}
360 Requires: bash-completion >= 2
363 %description -n bash-completion-packagekit
364 This package provides bash-completion for PackageKit console commands.
366 %description -n bash-completion-packagekit -l pl.UTF-8
367 Pakiet ten dostarcza bashowe uzupełnianie parametrów dla poleceń
368 konsolowych PackageKit.
370 %package -n python-packagekit
371 Summary: PackageKit Python bindings
372 Summary(pl.UTF-8): Wiązania PackageKit dla Pythona
373 Group: Development/Languages/Python
374 Requires: python-dbus
375 Requires: python-pygobject
377 %description -n python-packagekit
378 PackageKit Python bindings.
380 %description -n python-packagekit -l pl.UTF-8
381 Wiązania PackageKit dla Pythona.
389 %if %{with static_libs}
390 %{__sed} -i -e '/^packagekit_glib2_library =/ s/shared_library/library/' lib/packagekit-glib2/meson.build
394 %{?with_zypp:CPPFLAGS="%{rpmcppflags} -D_RPM_5 -I/usr/include/rpm"}
396 -Dbash_command_not_found=false \
397 %{!?with_introspection:-Dgobject_introspection=false} \
398 %{?with_doc:-Dgtk_doc=true} \
399 -Dpackaging_backend=dummy%{?with_alpm:,alpm}%{?with_apt:,aptcc}%{?with_dnf:,dnf}%{?with_entropy:,entropy}%{?with_poldek:,poldek}%{?with_portage:,portage}%{?with_slack:,slack}%{?with_zypp:,zypp}%{?with_nix:,nix} \
400 %{!?with_python:-Dpython_backend=false} \
401 -Dpythonpackagedir=%{py_sitescriptdir} \
402 -Dsystemdsystemunitdir=%{systemdunitdir}
408 %ninja_build -C build
411 rm -rf $RPM_BUILD_ROOT
412 install -d $RPM_BUILD_ROOT/var/cache/PackageKit/downloads
414 %ninja_install -C build
416 %{__rm} $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/libpk_backend_test_*.so
417 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/test_spawn
419 # use pk-gstreamer-install as codec installer
420 ln -s pk-gstreamer-install $RPM_BUILD_ROOT%{_libexecdir}/gst-install-plugins-helper
422 install -d $RPM_BUILD_ROOT%{systemdunitdir}/system-update.target.wants
423 ln -sf ../packagekit-offline-update.service \
424 $RPM_BUILD_ROOT%{systemdunitdir}/system-update.target.wants/packagekit-offline-update.service
427 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
428 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
436 rm -rf $RPM_BUILD_ROOT
439 %update_mime_database
442 %update_mime_database
444 %post libs -p /sbin/ldconfig
445 %postun libs -p /sbin/ldconfig
447 %files -f %{name}.lang
448 %defattr(644,root,root,755)
449 %doc AUTHORS HACKING MAINTAINERS NEWS README
450 %attr(755,root,root) %{_bindir}/pkcon
451 %attr(755,root,root) %{_bindir}/pkmon
452 %attr(750,root,root) /etc/cron.daily/packagekit-background.cron
453 %attr(755,root,root) %{_libexecdir}/packagekit-direct
454 %attr(755,root,root) %{_libexecdir}/packagekitd
455 %attr(755,root,root) %{_libexecdir}/pk-offline-update
456 %dir %{_libdir}/packagekit-backend
457 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_dummy.so
458 %dir %{_sysconfdir}/PackageKit
459 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/PackageKit.conf
460 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/Vendor.conf
461 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/packagekit-background
462 /etc/dbus-1/system.d/org.freedesktop.PackageKit.conf
463 %dir %{_datadir}/PackageKit
464 %dir %{_datadir}/PackageKit/helpers
465 %attr(755,root,root) %{_datadir}/PackageKit/pk-upgrade-distro.sh
466 %{_datadir}/polkit-1/actions/org.freedesktop.packagekit.policy
467 %{_datadir}/polkit-1/rules.d/org.freedesktop.packagekit.rules
468 %{_datadir}/dbus-1/system-services/org.freedesktop.PackageKit.service
469 %{_mandir}/man1/pkcon.1*
470 %{_mandir}/man1/pkmon.1*
471 %{systemdunitdir}/packagekit.service
472 %{systemdunitdir}/packagekit-offline-update.service
473 %{systemdunitdir}/system-update.target.wants/packagekit-offline-update.service
474 %dir /var/cache/PackageKit
475 %dir /var/cache/PackageKit/downloads
476 %dir /var/lib/PackageKit
477 %ghost /var/lib/PackageKit/transactions.db
480 %defattr(644,root,root,755)
481 %attr(755,root,root) %{_libdir}/libpackagekit-glib2.so.*.*.*
482 %attr(755,root,root) %ghost %{_libdir}/libpackagekit-glib2.so.18
483 %{_libdir}/girepository-1.0/PackageKitGlib-1.0.typelib
484 # NOTE: dbus interface xmls are commonly used:
485 # - at runtime by packagekitd
486 # - for development of applications using PK dbus interface
487 %{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.Transaction.xml
488 %{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.xml
491 %defattr(644,root,root,755)
492 %attr(755,root,root) %{_libdir}/libpackagekit-glib2.so
493 %{_pkgconfigdir}/packagekit-glib2.pc
494 %dir %{_includedir}/PackageKit
495 %{_includedir}/PackageKit/packagekit-glib2
496 %{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
499 %defattr(644,root,root,755)
500 %{_libdir}/libpackagekit-glib2.a
503 %files -n vala-packagekit
504 %defattr(644,root,root,755)
505 %{_datadir}/vala/vapi/packagekit-glib2.deps
506 %{_datadir}/vala/vapi/packagekit-glib2.vapi
510 %defattr(644,root,root,755)
511 %{_gtkdocdir}/PackageKit
515 %defattr(644,root,root,755)
516 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_alpm.so
517 %dir %{_sysconfdir}/PackageKit/alpm.d
518 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/alpm.d/groups.list
519 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/alpm.d/pacman.conf
520 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/alpm.d/repos.list
525 %defattr(644,root,root,755)
526 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_aptcc.so
527 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apt/apt.conf.d/20packagekit
528 %dir %{_datadir}/PackageKit/helpers/aptcc
529 %attr(755,root,root) %{_datadir}/PackageKit/helpers/aptcc/get-distro-upgrade.py
530 %attr(755,root,root) %{_datadir}/PackageKit/helpers/aptcc/pkconffile
531 %{_datadir}/PackageKit/helpers/aptcc/pkconffile.nodiff
536 %defattr(644,root,root,755)
537 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_dnf.so
541 %files backend-entropy
542 %defattr(644,root,root,755)
543 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_entropy.so
544 %dir %{_datadir}/PackageKit/helpers/entropy
545 %attr(755,root,root) %{_datadir}/PackageKit/helpers/entropy/entropyBackend.py
550 %defattr(644,root,root,755)
551 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_nix.so
555 %files backend-poldek
556 %defattr(644,root,root,755)
557 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_poldek.so
561 %files backend-portage
562 %defattr(644,root,root,755)
563 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_portage.so
564 %dir %{_datadir}/PackageKit/helpers/portage
565 %attr(755,root,root) %{_datadir}/PackageKit/helpers/portage/portageBackend.py
570 %defattr(644,root,root,755)
571 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_slack.so
572 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/Slackware.conf
573 %dir /var/cache/PackageKit/metadata
574 %ghost /var/cache/PackageKit/metadata/metadata.db
579 %defattr(644,root,root,755)
580 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_zypp.so
583 %files gstreamer-plugin
584 %defattr(644,root,root,755)
585 %doc contrib/gstreamer-plugin/README
586 %attr(755,root,root) %{_libexecdir}/gst-install-plugins-helper
587 %attr(755,root,root) %{_libexecdir}/pk-gstreamer-install
590 %defattr(644,root,root,755)
591 %doc contrib/gtk-module/{GLASS.txt,README}
592 %attr(755,root,root) %{_libdir}/gtk-3.0/modules/libpk-gtk-module.so
593 %{_libdir}/gnome-settings-daemon-3.0/gtk-modules/pk-gtk-module.desktop
595 %files -n bash-completion-packagekit
596 %defattr(644,root,root,755)
597 %{bash_compdir}/pkcon
600 %files -n python-packagekit
601 %defattr(644,root,root,755)
602 %dir %{py_sitescriptdir}/packagekit
603 %{py_sitescriptdir}/packagekit/*.py[co]