]> git.pld-linux.org Git - packages/PackageKit.git/blob - PackageKit.spec
- versioned zif Obsoletes (backend removed in 0.8.14)
[packages/PackageKit.git] / PackageKit.spec
1 # TODO:
2 # - BASH command-not-found functionality disabled for now as it needs patched bash
3 #   (details in bash from Fedora Rawhide)
4 #
5 # Conditional build:
6 %bcond_without  doc             # build without docs
7 %bcond_without  introspection   # gobject introspection, time to time broken
8 %bcond_without  poldek          # Poldek backend
9 %bcond_without  smart           # SMART backend
10 %bcond_without  yum             # YUM backend
11 %bcond_with     hawkey          # Hawkey backend
12 %bcond_with     browser         # browser plugin (patrys says: it's flawed by concept)
13
14 # default backend, configurable at runtime
15 %define         backend poldek
16
17 Summary:        System daemon that is a D-Bus abstraction layer for package management
18 Summary(pl.UTF-8):      Demon systemowy będący warstwą abstrakcji D-Bus do zarządzania pakietami
19 Name:           PackageKit
20 Version:        0.8.15
21 Release:        1
22 License:        GPL v2+
23 Group:          Applications/System
24 Source0:        http://www.packagekit.org/releases/%{name}-%{version}.tar.xz
25 # Source0-md5:  147e35b64e3e3b9ca8b2baefb37531f6
26 Patch0:         %{name}-hawkey-rpm5.patch
27 Patch3:         smart-at-fix.patch
28 Patch4:         %{name}-gstreamer.patch
29 Patch5:         %{name}-bashcomp.patch
30 Patch6:         %{name}-connman.patch
31 URL:            http://www.packagekit.org/
32 BuildRequires:  NetworkManager-devel >= 0.6.5
33 BuildRequires:  autoconf >= 2.65
34 BuildRequires:  automake >= 1:1.11
35 BuildRequires:  connman-devel
36 BuildRequires:  dbus-devel >= 1.2.0
37 BuildRequires:  dbus-glib-devel >= 0.76
38 BuildRequires:  docbook-dtd412-xml
39 BuildRequires:  docbook-dtd42-xml
40 BuildRequires:  fontconfig-devel
41 BuildRequires:  gettext-devel
42 BuildRequires:  glib2-devel >= 1:2.32.0
43 %{?with_introspection:BuildRequires:    gobject-introspection-devel >= 0.9.9}
44 BuildRequires:  gstreamer-devel >= 1.0.0
45 BuildRequires:  gstreamer-plugins-base-devel >= 1.0.0
46 BuildRequires:  gtk+2-devel >= 2:2.14.0
47 BuildRequires:  gtk+3-devel >= 3.0.0
48 %{?with_doc:BuildRequires:      gtk-doc >= 1.11}
49 %{?with_hawkey:BuildRequires:   hawkey-devel >= 0.4.5}
50 BuildRequires:  intltool >= 0.35.0
51 BuildRequires:  libarchive-devel
52 %{?with_hawkey:BuildRequires:   librepo-devel}
53 BuildRequires:  libtool
54 BuildRequires:  libxslt-progs
55 BuildRequires:  pango-devel
56 BuildRequires:  pkgconfig
57 %{?with_poldek:BuildRequires:   poldek-devel >= 0.30-1.rc6.4}
58 BuildRequires:  polkit-devel >= 0.98
59 BuildRequires:  python-devel >= 1:2.7
60 BuildRequires:  readline-devel
61 %{?with_hawkey:BuildRequires:   rpm-devel >= 4.11.0}
62 BuildRequires:  rpm-pythonprov
63 BuildRequires:  rpmbuild(macros) >= 1.311
64 BuildRequires:  sqlite3-devel >= 3
65 BuildRequires:  systemd-devel
66 BuildRequires:  tar >= 1:1.22
67 BuildRequires:  udev-glib-devel
68 BuildRequires:  xz
69 %if %{with browser}
70 BuildRequires:  cairo-devel
71 BuildRequires:  nspr-devel >= 4.8
72 BuildRequires:  xulrunner-devel >= 8.0
73 %endif
74 Requires(post,postun):  shared-mime-info
75 Requires:       %{name}-backend
76 Requires:       %{name}-libs = %{version}-%{release}
77 Requires:       ConsoleKit-x11
78 Requires:       crondaemon
79 Requires:       polkit >= 0.98
80 Obsoletes:      PackageKit-docs < 0.8.4
81 Obsoletes:      pm-utils-packagekit
82 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
83
84 %description
85 PackageKit is a D-Bus abstraction layer that allows the session user
86 to manage packages in a secure way using a cross-distro,
87 cross-architecture API.
88
89 %description -l pl.UTF-8
90 PackageKit to warstwa abstrakcji D-Bus pozwalająca użytkownikowi
91 sesyjnemu w bezpieczny sposob zarządzać pakietami przy użyciu API
92 zgodnego z wieloma dystrybucjami i architekturami.
93
94 %package libs
95 Summary:        packagekit-glib library
96 Summary(pl.UTF-8):      Biblioteka packagekit-glib
97 Group:          Libraries
98 Requires:       glib2 >= 1:2.32.0
99
100 %description libs
101 packagekit-glib library.
102
103 %description libs -l pl.UTF-8
104 Biblioteka packagekit-glib.
105
106 %package devel
107 Summary:        Header files for packagekit-glib library
108 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki packagekit-glib
109 Group:          Development/Libraries
110 Requires:       %{name}-libs = %{version}-%{release}
111 Requires:       dbus-devel >= 1.2.0
112 Requires:       glib2-devel >= 1:2.32.0
113 Requires:       sqlite3-devel
114
115 %description devel
116 Header files for packagekit-glib library.
117
118 %description devel -l pl.UTF-8
119 Pliki nagłówkowe biblioteki packagekit-glib.
120
121 %package static
122 Summary:        Static packagekit-glib library
123 Summary(pl.UTF-8):      Statyczna biblioteka packagekit-glib
124 Group:          Development/Libraries
125 Requires:       %{name}-devel = %{version}-%{release}
126
127 %description static
128 Static packagekit-glib library.
129
130 %description static -l pl.UTF-8
131 Statyczna biblioteka packagekit-glib.
132
133 %package apidocs
134 Summary:        PackageKit library API documentation
135 Summary(pl.UTF-8):      Dokumentacja API biblioteki PackageKit
136 Group:          Documentation
137 Requires:       gtk-doc-common
138
139 %description apidocs
140 PackageKit library API documentation.
141
142 %description apidocs -l pl.UTF-8
143 Dokumentacja API biblioteki PackageKit.
144
145 %package backend-hawkey
146 Summary:        PackageKit Hawkey backend
147 Summary(pl.UTF-8):      Backend PackageKit oparty na Hawkeyu
148 Group:          Libraries
149 Requires:       %{name} = %{version}-%{release}
150 Requires:       hawkey >= 0.4.5
151 Provides:       %{name}-backend = %{version}-%{release}
152 Obsoletes:      PackageKit-backend-zif < 0.8.14
153
154 %description backend-hawkey
155 A backend for PackageKit to enable Hawkey functionality.
156
157 %description backend-hawkey -l pl.UTF-8
158 Backend PackageKit dodający obsługę Hawkeya.
159
160 %package backend-poldek
161 Summary:        PackageKit Poldek backend
162 Summary(pl.UTF-8):      Backend PackageKit oparty na Poldku
163 Group:          Libraries
164 Requires:       %{name} = %{version}-%{release}
165 Requires:       poldek >= 0.30-1.rc6.4
166 Provides:       %{name}-backend = %{version}-%{release}
167 Conflicts:      PackageKit < 0.6.8-3
168
169 %description backend-poldek
170 A backend for PackageKit to enable Poldek functionality.
171
172 %description backend-poldek -l pl.UTF-8
173 Backend PackageKit dodający obsługę Poldka.
174
175 %package backend-smart
176 Summary:        PackageKit SMART backend
177 Summary(pl.UTF-8):      Backend PackageKit oparty na zarządcy pakietów SMART
178 Group:          Libraries
179 Requires:       %{name} = %{version}-%{release}
180 Requires:       smart
181
182 %description backend-smart
183 A backend for PackageKit to enable SMART functionality.
184
185 %description backend-smart -l pl.UTF-8
186 Backend PackageKit dodający obsługę zarządcy pakietów SMART.
187
188 %package backend-yum
189 Summary:        PackageKit YUM backend
190 Summary(pl.UTF-8):      Backend PackageKit oparty na Yumie
191 Group:          Libraries
192 Requires:       %{name} = %{version}-%{release}
193 Requires:       python-packagekit = %{version}-%{release}
194 Requires:       yum >= 3.2.19
195 Provides:       %{name}-backend = %{version}-%{release}
196
197 %description backend-yum
198 A backend for PackageKit to enable yum functionality.
199
200 %description backend-yum -l pl.UTF-8
201 Backend PackageKit dodający obsługę Yuma.
202
203 %package gstreamer-plugin
204 Summary:        GStreamer codecs installer
205 Summary(pl.UTF-8):      Instalator kodeków GStreamera
206 Group:          Applications
207 Requires:       %{name} = %{version}-%{release}
208 Requires:       %{name}-gtk-module = %{version}-%{release}
209
210 %description gstreamer-plugin
211 The PackageKit GStreamer plugin allows any GStreamer application to
212 install codecs from configured repositories using PackageKit.
213
214 %description gstreamer-plugin -l pl.UTF-8
215 Wtyczka GStreamer pozwala każdej aplikacji używającej GStreamera
216 zainstalować kodeki ze skonfigurowanych źródeł PackageKit.
217
218 %package gtk-module
219 Summary:        GTK+ module to detect and install missing fonts
220 Summary(pl.UTF-8):      Moduł GTK+ do wykrywania i instalowania brakujących czcionek
221 Group:          X11/Libraries
222
223 %description gtk-module
224 The PackageKit GTK+ module allows any pango application to install
225 missing fonts from configured repositories using PackageKit.
226
227 %description gtk-module -l pl.UTF-8
228 Moduł GTK+ pozwala każdej aplikacji używającej pango zainstalować
229 brakującą czcionkę ze skonfigurowanych źródeł PackageKit.
230
231 %package gtk3-module
232 Summary:        GTK+ 3.x module to detect and install missing fonts
233 Summary(pl.UTF-8):      Moduł GTK+ 3.x do wykrywania i instalowania brakujących czcionek
234 Group:          X11/Libraries
235
236 %description gtk3-module
237 The PackageKit GTK+ 3.x module allows any pango application to install
238 missing fonts from configured repositories using PackageKit.
239
240 %description gtk3-module -l pl.UTF-8
241 Moduł GTK+ 3.x pozwala każdej aplikacji używającej pango zainstalować
242 brakującą czcionkę ze skonfigurowanych źródeł PackageKit.
243
244 %package -n bash-completion-packagekit
245 Summary:        Bash completion for PackageKit console commands
246 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów dla poleceń konsolowych PackageKit
247 Group:          Applications/Shells
248 Requires:       %{name} = %{version}-%{release}
249 Requires:       bash-completion >= 2
250
251 %description -n bash-completion-packagekit
252 This package provides bash-completion for PackageKit console commands.
253
254 %description -n bash-completion-packagekit -l pl.UTF-8
255 Pakiet ten dostarcza bashowe uzupełnianie parametrów dla poleceń
256 konsolowych PackageKit.
257
258 %package -n python-packagekit
259 Summary:        PackageKit Python bindings
260 Summary(pl.UTF-8):      Wiązania PackageKit dla Pythona
261 Group:          Development/Languages/Python
262 Requires:       python-dbus
263 Requires:       python-pygobject
264
265 %description -n python-packagekit
266 PackageKit Python bindings.
267
268 %description -n python-packagekit -l pl.UTF-8
269 Wiązania PackageKit dla Pythona.
270
271 %package -n browser-plugin-packagekit
272 Summary:        PackageKit's browser plugin
273 Summary(pl.UTF-8):      Wtyczka PackageKit do przeglądarek WWW
274 Group:          X11/Libraries
275 Requires:       %{name} = %{version}-%{release}
276 Requires:       browser-plugins >= 2.0
277 Requires:       browser-plugins(%{_target_base_arch})
278
279 %description -n browser-plugin-packagekit
280 PackageKit's plugin for browsers.
281
282 %description -n browser-plugin-packagekit -l pl.UTF-8
283 Wtyczka PackageKit do przeglądarek WWW.
284
285 %prep
286 %setup -q
287 %patch0 -p1
288 %patch3 -p0
289 %patch4 -p1
290 %patch5 -p1
291 %patch6 -p1
292
293 %build
294 %if %{with doc}
295 %{__gtkdocize}
296 %endif
297 %{__intltoolize}
298 %{__libtoolize}
299 %{__aclocal} -I m4
300 %{__autoconf}
301 %{__autoheader}
302 %{__automake}
303 %configure \
304         --disable-command-not-found \
305         --disable-dummy \
306         %{!?with_doc:--disable-gtk-doc} \
307         %{!?with_introspection:--disable-introspection} \
308         --disable-silent-rules \
309         --enable-bash-completion=%{bash_compdir} \
310         %{__enable_disable browser browser-plugin} \
311         %{__enable_disable hawkey} \
312         %{__enable_disable poldek} \
313         %{__enable_disable smart} \
314         %{__enable_disable yum} \
315         --with-default-backend=%{backend} \
316         --with-html-dir=%{_gtkdocdir} \
317         --with-mozilla-plugin-dir=%{_browserpluginsdir} \
318         --with-security-framework=polkit
319 %{__make}
320
321 %install
322 rm -rf $RPM_BUILD_ROOT
323
324 %{__make} install \
325         DESTDIR=$RPM_BUILD_ROOT
326
327 # use pk-gstreamer-install as codec installer
328 ln -s pk-gstreamer-install $RPM_BUILD_ROOT%{_libdir}/gst-install-plugins-helper
329
330 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gtk-{2,3}.0/modules/*.{la,a}
331 %{__rm} $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.{la,a}
332 %{__rm} $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/libpk_backend_test_*.so
333 %{__rm} $RPM_BUILD_ROOT%{_libdir}/packagekit-plugins/*.{la,a}
334 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
335 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/test_spawn
336
337 %if %{with browser}
338 %{__rm} $RPM_BUILD_ROOT%{_browserpluginsdir}/*.{la,a}
339 %endif
340
341 %if %{with yum}
342 # yumBackend.py can't be compiled (invoked directly), other should be compiled
343 %py_comp $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum
344 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum
345 %{__rm} $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum/yum{Comps,Filter}.py
346 %{__rm} $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum/yumBackend.py[co]
347 %endif
348
349 # outdated copies of bg,it
350 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{bg_BG,it_IT}
351 # fa_IR uses short dir name
352 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{fa_IR,fa}
353
354 %py_postclean
355
356 %find_lang %{name}
357
358 %clean
359 rm -rf $RPM_BUILD_ROOT
360
361 %post
362 %update_mime_database
363
364 %postun
365 %update_mime_database
366
367 %post   libs -p /sbin/ldconfig
368 %postun libs -p /sbin/ldconfig
369
370 %post -n browser-plugin-packagekit
371 %update_browser_plugins
372
373 %postun -n browser-plugin-packagekit
374 if [ "$1" = 0 ]; then
375         %update_browser_plugins
376 fi
377
378 %files -f %{name}.lang
379 %defattr(644,root,root,755)
380 %doc AUTHORS HACKING MAINTAINERS NEWS README TODO
381 %attr(755,root,root) %{_bindir}/packagekit-bugreport.sh
382 %attr(755,root,root) %{_bindir}/pkcon
383 %attr(755,root,root) %{_bindir}/pkmon
384 %attr(755,root,root) %{_bindir}/pk-debuginfo-install
385 %attr(750,root,root) /etc/cron.daily/packagekit-background.cron
386 %dir %{_libdir}/packagekit-backend
387 %dir %{_libdir}/packagekit-plugins
388 %attr(755,root,root) %{_libdir}/packagekit-plugins/libpk_plugin-scan-desktop-files.so
389 %attr(755,root,root) %{_libdir}/packagekit-plugins/libpk_plugin-systemd-updates.so
390 %attr(755,root,root) %{_libdir}/packagekit-plugins/libpk_plugin-update-package-cache.so
391 %attr(755,root,root) %{_libdir}/packagekit-plugins/libpk_plugin_scripts.so
392 %attr(755,root,root) %{_libdir}/packagekitd
393 %attr(755,root,root) %{_libdir}/pk-clear-offline-update
394 %attr(755,root,root) %{_libdir}/pk-offline-update
395 %attr(755,root,root) %{_libdir}/pk-trigger-offline-update
396 %dir %{_sysconfdir}/PackageKit
397 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/PackageKit.conf
398 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/Vendor.conf
399 %dir %{_sysconfdir}/PackageKit/events
400 %{_sysconfdir}/PackageKit/events/post-transaction.d
401 %{_sysconfdir}/PackageKit/events/pre-transaction.d
402 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/packagekit-background
403 /etc/dbus-1/system.d/org.freedesktop.PackageKit.conf
404 %dir %{_datadir}/PackageKit
405 %dir %{_datadir}/PackageKit/helpers
406 %attr(755,root,root) %{_datadir}/PackageKit/pk-upgrade-distro.sh
407 %{_datadir}/polkit-1/actions/org.freedesktop.packagekit.policy
408 %{_datadir}/polkit-1/rules.d/org.freedesktop.packagekit.rules
409 %{_datadir}/dbus-1/system-services/org.freedesktop.PackageKit.service
410 %{_mandir}/man1/pkcon.1*
411 %{_mandir}/man1/pk-debuginfo-install.1*
412 %{_mandir}/man1/pkmon.1*
413 %{systemdunitdir}/packagekit.service
414 %{systemdunitdir}/packagekit-offline-update.service
415 %dir /var/cache/PackageKit
416 %dir /var/cache/PackageKit/downloads
417 %dir /var/lib/PackageKit
418 %ghost /var/lib/PackageKit/transactions.db
419
420 %files libs
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_libdir}/libpackagekit-glib2.so.*.*.*
423 %attr(755,root,root) %ghost %{_libdir}/libpackagekit-glib2.so.16
424 %{_libdir}/girepository-1.0/PackageKitGlib-1.0.typelib
425 %{_libdir}/girepository-1.0/PackageKitPlugin-1.0.typelib
426 # NOTE: dbus interface xmls are commonly used:
427 # - at runtime by packagekitd
428 # - for development of applications using PK dbus interface
429 %{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.Transaction.xml
430 %{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.xml
431
432 %files devel
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/libpackagekit-glib2.so
435 %{_pkgconfigdir}/packagekit-glib2.pc
436 %{_pkgconfigdir}/packagekit-plugin.pc
437 %dir %{_includedir}/PackageKit
438 %{_includedir}/PackageKit/packagekit-glib2
439 %{_includedir}/PackageKit/plugin
440 %{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
441 %{_datadir}/gir-1.0/PackageKitPlugin-1.0.gir
442
443 %files static
444 %defattr(644,root,root,755)
445 %{_libdir}/libpackagekit-glib2.a
446
447 %files apidocs
448 %defattr(644,root,root,755)
449 %{_gtkdocdir}/PackageKit
450
451 %if %{with hawkey}
452 %files backend-hawkey
453 %defattr(644,root,root,755)
454 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_hawkey.so
455 %endif
456
457 %if %{with poldek}
458 %files backend-poldek
459 %defattr(644,root,root,755)
460 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_poldek.so
461 %endif
462
463 %if %{with smart}
464 %files backend-smart
465 %defattr(644,root,root,755)
466 %{_libdir}/packagekit-backend/libpk_backend_smart.so
467 %dir %{_datadir}/PackageKit/helpers/smart
468 %attr(755,root,root) %{_datadir}/PackageKit/helpers/smart/smartBackend.py
469 %endif
470
471 %if %{with yum}
472 %files backend-yum
473 %defattr(644,root,root,755)
474 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_yum.so
475 %dir %{_datadir}/PackageKit/helpers/yum
476 %{_datadir}/PackageKit/helpers/yum/licenses.txt
477 %{_datadir}/PackageKit/helpers/yum/yum-comps-groups.conf
478 %attr(755,root,root) %{_datadir}/PackageKit/helpers/yum/yumBackend.py
479 %{_datadir}/PackageKit/helpers/yum/yumComps.py[co]
480 %{_datadir}/PackageKit/helpers/yum/yumFilter.py[co]
481
482 # yum plugin
483 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/yum/pluginconf.d/refresh-packagekit.conf
484 %{_prefix}/lib/yum-plugins/refresh-packagekit.py
485 %endif
486
487 %files gstreamer-plugin
488 %defattr(644,root,root,755)
489 %doc contrib/gstreamer-plugin/README
490 %attr(755,root,root) %{_libdir}/gst-install-plugins-helper
491 %attr(755,root,root) %{_libdir}/pk-gstreamer-install
492
493 %files gtk-module
494 %defattr(644,root,root,755)
495 %doc contrib/gtk-module/{GLASS.txt,README}
496 %attr(755,root,root) %{_libdir}/gtk-2.0/modules/libpk-gtk-module.so
497
498 %files gtk3-module
499 %defattr(644,root,root,755)
500 %attr(755,root,root) %{_libdir}/gtk-3.0/modules/libpk-gtk-module.so
501 %{_libdir}/gnome-settings-daemon-3.0/gtk-modules/pk-gtk-module.desktop
502
503 %files -n bash-completion-packagekit
504 %defattr(644,root,root,755)
505 %{bash_compdir}/pkcon
506
507 %files -n python-packagekit
508 %defattr(644,root,root,755)
509 %dir %{py_sitescriptdir}/packagekit
510 %{py_sitescriptdir}/packagekit/*.py[co]
511
512 %if %{with browser}
513 %files -n browser-plugin-packagekit
514 %defattr(644,root,root,755)
515 %attr(755,root,root) %{_browserpluginsdir}/packagekit-plugin.so
516 %endif
This page took 0.120533 seconds and 4 git commands to generate.