]> git.pld-linux.org Git - packages/PackageKit.git/blob - PackageKit.spec
- updated to 0.8.17
[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.17
21 Release:        1
22 License:        GPL v2+
23 Group:          Applications/System
24 Source0:        http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
25 # Source0-md5:  a2b1a602fee21430b735e52aaf33bd1a
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.6}
50 BuildRequires:  intltool >= 0.35.0
51 BuildRequires:  libarchive-devel
52 %{?with_hawkey:BuildRequires:   librepo-devel >= 0.1.5}
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.6
151 Requires:       librepo >= 0.1.5
152 Provides:       %{name}-backend = %{version}-%{release}
153 Obsoletes:      PackageKit-backend-zif < 0.8.14
154
155 %description backend-hawkey
156 A backend for PackageKit to enable Hawkey functionality.
157
158 %description backend-hawkey -l pl.UTF-8
159 Backend PackageKit dodający obsługę Hawkeya.
160
161 %package backend-poldek
162 Summary:        PackageKit Poldek backend
163 Summary(pl.UTF-8):      Backend PackageKit oparty na Poldku
164 Group:          Libraries
165 Requires:       %{name} = %{version}-%{release}
166 Requires:       poldek >= 0.30-1.rc6.4
167 Provides:       %{name}-backend = %{version}-%{release}
168 Conflicts:      PackageKit < 0.6.8-3
169
170 %description backend-poldek
171 A backend for PackageKit to enable Poldek functionality.
172
173 %description backend-poldek -l pl.UTF-8
174 Backend PackageKit dodający obsługę Poldka.
175
176 %package backend-smart
177 Summary:        PackageKit SMART backend
178 Summary(pl.UTF-8):      Backend PackageKit oparty na zarządcy pakietów SMART
179 Group:          Libraries
180 Requires:       %{name} = %{version}-%{release}
181 Requires:       smart
182
183 %description backend-smart
184 A backend for PackageKit to enable SMART functionality.
185
186 %description backend-smart -l pl.UTF-8
187 Backend PackageKit dodający obsługę zarządcy pakietów SMART.
188
189 %package backend-yum
190 Summary:        PackageKit YUM backend
191 Summary(pl.UTF-8):      Backend PackageKit oparty na Yumie
192 Group:          Libraries
193 Requires:       %{name} = %{version}-%{release}
194 Requires:       python-packagekit = %{version}-%{release}
195 Requires:       yum >= 3.2.19
196 Provides:       %{name}-backend = %{version}-%{release}
197
198 %description backend-yum
199 A backend for PackageKit to enable yum functionality.
200
201 %description backend-yum -l pl.UTF-8
202 Backend PackageKit dodający obsługę Yuma.
203
204 %package gstreamer-plugin
205 Summary:        GStreamer codecs installer
206 Summary(pl.UTF-8):      Instalator kodeków GStreamera
207 Group:          Applications
208 Requires:       %{name} = %{version}-%{release}
209 Requires:       %{name}-gtk-module = %{version}-%{release}
210
211 %description gstreamer-plugin
212 The PackageKit GStreamer plugin allows any GStreamer application to
213 install codecs from configured repositories using PackageKit.
214
215 %description gstreamer-plugin -l pl.UTF-8
216 Wtyczka GStreamer pozwala każdej aplikacji używającej GStreamera
217 zainstalować kodeki ze skonfigurowanych źródeł PackageKit.
218
219 %package gtk-module
220 Summary:        GTK+ module to detect and install missing fonts
221 Summary(pl.UTF-8):      Moduł GTK+ do wykrywania i instalowania brakujących czcionek
222 Group:          X11/Libraries
223
224 %description gtk-module
225 The PackageKit GTK+ module allows any pango application to install
226 missing fonts from configured repositories using PackageKit.
227
228 %description gtk-module -l pl.UTF-8
229 Moduł GTK+ pozwala każdej aplikacji używającej pango zainstalować
230 brakującą czcionkę ze skonfigurowanych źródeł PackageKit.
231
232 %package gtk3-module
233 Summary:        GTK+ 3.x module to detect and install missing fonts
234 Summary(pl.UTF-8):      Moduł GTK+ 3.x do wykrywania i instalowania brakujących czcionek
235 Group:          X11/Libraries
236
237 %description gtk3-module
238 The PackageKit GTK+ 3.x module allows any pango application to install
239 missing fonts from configured repositories using PackageKit.
240
241 %description gtk3-module -l pl.UTF-8
242 Moduł GTK+ 3.x pozwala każdej aplikacji używającej pango zainstalować
243 brakującą czcionkę ze skonfigurowanych źródeł PackageKit.
244
245 %package -n bash-completion-packagekit
246 Summary:        Bash completion for PackageKit console commands
247 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów dla poleceń konsolowych PackageKit
248 Group:          Applications/Shells
249 Requires:       %{name} = %{version}-%{release}
250 Requires:       bash-completion >= 2
251 %if "%{_rpmversion}" >= "5"
252 BuildArch:      noarch
253 %endif
254
255 %description -n bash-completion-packagekit
256 This package provides bash-completion for PackageKit console commands.
257
258 %description -n bash-completion-packagekit -l pl.UTF-8
259 Pakiet ten dostarcza bashowe uzupełnianie parametrów dla poleceń
260 konsolowych PackageKit.
261
262 %package -n python-packagekit
263 Summary:        PackageKit Python bindings
264 Summary(pl.UTF-8):      Wiązania PackageKit dla Pythona
265 Group:          Development/Languages/Python
266 Requires:       python-dbus
267 Requires:       python-pygobject
268
269 %description -n python-packagekit
270 PackageKit Python bindings.
271
272 %description -n python-packagekit -l pl.UTF-8
273 Wiązania PackageKit dla Pythona.
274
275 %package -n browser-plugin-packagekit
276 Summary:        PackageKit's browser plugin
277 Summary(pl.UTF-8):      Wtyczka PackageKit do przeglądarek WWW
278 Group:          X11/Libraries
279 Requires:       %{name} = %{version}-%{release}
280 Requires:       browser-plugins >= 2.0
281 Requires:       browser-plugins(%{_target_base_arch})
282
283 %description -n browser-plugin-packagekit
284 PackageKit's plugin for browsers.
285
286 %description -n browser-plugin-packagekit -l pl.UTF-8
287 Wtyczka PackageKit do przeglądarek WWW.
288
289 %prep
290 %setup -q
291 %patch0 -p1
292 %patch3 -p0
293 %patch4 -p1
294 %patch5 -p1
295 %patch6 -p1
296
297 %build
298 %if %{with doc}
299 %{__gtkdocize}
300 %endif
301 %{__intltoolize}
302 %{__libtoolize}
303 %{__aclocal} -I m4
304 %{__autoconf}
305 %{__autoheader}
306 %{__automake}
307 %configure \
308         --disable-command-not-found \
309         --disable-dummy \
310         %{!?with_doc:--disable-gtk-doc} \
311         %{!?with_introspection:--disable-introspection} \
312         --disable-silent-rules \
313         --enable-bash-completion=%{bash_compdir} \
314         %{__enable_disable browser browser-plugin} \
315         %{__enable_disable hawkey} \
316         %{__enable_disable poldek} \
317         %{__enable_disable smart} \
318         %{__enable_disable yum} \
319         --with-default-backend=%{backend} \
320         --with-html-dir=%{_gtkdocdir} \
321         --with-mozilla-plugin-dir=%{_browserpluginsdir} \
322         --with-security-framework=polkit
323 %{__make}
324
325 %install
326 rm -rf $RPM_BUILD_ROOT
327
328 %{__make} install \
329         DESTDIR=$RPM_BUILD_ROOT
330
331 # use pk-gstreamer-install as codec installer
332 ln -s pk-gstreamer-install $RPM_BUILD_ROOT%{_libdir}/gst-install-plugins-helper
333
334 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gtk-{2,3}.0/modules/*.{la,a}
335 %{__rm} $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.{la,a}
336 %{__rm} $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/libpk_backend_test_*.so
337 %{__rm} $RPM_BUILD_ROOT%{_libdir}/packagekit-plugins/*.{la,a}
338 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
339 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/test_spawn
340
341 %if %{with browser}
342 %{__rm} $RPM_BUILD_ROOT%{_browserpluginsdir}/*.{la,a}
343 %endif
344
345 %if %{with yum}
346 # yumBackend.py can't be compiled (invoked directly), other should be compiled
347 %py_comp $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum
348 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum
349 %{__rm} $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum/yum{Comps,Filter}.py
350 %{__rm} $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum/yumBackend.py[co]
351 %endif
352
353 # outdated copies of bg,it
354 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{bg_BG,it_IT}
355 # fa_IR uses short dir name
356 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{fa_IR,fa}
357
358 %py_postclean
359
360 %find_lang %{name}
361
362 %clean
363 rm -rf $RPM_BUILD_ROOT
364
365 %post
366 %update_mime_database
367
368 %postun
369 %update_mime_database
370
371 %post   libs -p /sbin/ldconfig
372 %postun libs -p /sbin/ldconfig
373
374 %post -n browser-plugin-packagekit
375 %update_browser_plugins
376
377 %postun -n browser-plugin-packagekit
378 if [ "$1" = 0 ]; then
379         %update_browser_plugins
380 fi
381
382 %files -f %{name}.lang
383 %defattr(644,root,root,755)
384 %doc AUTHORS HACKING MAINTAINERS NEWS README TODO
385 %attr(755,root,root) %{_bindir}/packagekit-bugreport.sh
386 %attr(755,root,root) %{_bindir}/pkcon
387 %attr(755,root,root) %{_bindir}/pkmon
388 %attr(755,root,root) %{_bindir}/pk-debuginfo-install
389 %attr(750,root,root) /etc/cron.daily/packagekit-background.cron
390 %dir %{_libdir}/packagekit-backend
391 %dir %{_libdir}/packagekit-plugins
392 %attr(755,root,root) %{_libdir}/packagekit-plugins/libpk_plugin-scan-desktop-files.so
393 %attr(755,root,root) %{_libdir}/packagekit-plugins/libpk_plugin-systemd-updates.so
394 %attr(755,root,root) %{_libdir}/packagekit-plugins/libpk_plugin-update-package-cache.so
395 %attr(755,root,root) %{_libdir}/packagekit-plugins/libpk_plugin_scripts.so
396 %attr(755,root,root) %{_libdir}/packagekitd
397 %attr(755,root,root) %{_libdir}/pk-clear-offline-update
398 %attr(755,root,root) %{_libdir}/pk-offline-update
399 %attr(755,root,root) %{_libdir}/pk-trigger-offline-update
400 %dir %{_sysconfdir}/PackageKit
401 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/PackageKit.conf
402 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/Vendor.conf
403 %dir %{_sysconfdir}/PackageKit/events
404 %{_sysconfdir}/PackageKit/events/post-transaction.d
405 %{_sysconfdir}/PackageKit/events/pre-transaction.d
406 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/packagekit-background
407 /etc/dbus-1/system.d/org.freedesktop.PackageKit.conf
408 %dir %{_datadir}/PackageKit
409 %dir %{_datadir}/PackageKit/helpers
410 %attr(755,root,root) %{_datadir}/PackageKit/pk-upgrade-distro.sh
411 %{_datadir}/polkit-1/actions/org.freedesktop.packagekit.policy
412 %{_datadir}/polkit-1/rules.d/org.freedesktop.packagekit.rules
413 %{_datadir}/dbus-1/system-services/org.freedesktop.PackageKit.service
414 %{_mandir}/man1/pkcon.1*
415 %{_mandir}/man1/pk-debuginfo-install.1*
416 %{_mandir}/man1/pkmon.1*
417 %{systemdunitdir}/packagekit.service
418 %{systemdunitdir}/packagekit-offline-update.service
419 %dir /var/cache/PackageKit
420 %dir /var/cache/PackageKit/downloads
421 %dir /var/lib/PackageKit
422 %ghost /var/lib/PackageKit/transactions.db
423
424 %files libs
425 %defattr(644,root,root,755)
426 %attr(755,root,root) %{_libdir}/libpackagekit-glib2.so.*.*.*
427 %attr(755,root,root) %ghost %{_libdir}/libpackagekit-glib2.so.16
428 %{_libdir}/girepository-1.0/PackageKitGlib-1.0.typelib
429 %{_libdir}/girepository-1.0/PackageKitPlugin-1.0.typelib
430 # NOTE: dbus interface xmls are commonly used:
431 # - at runtime by packagekitd
432 # - for development of applications using PK dbus interface
433 %{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.Transaction.xml
434 %{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.xml
435
436 %files devel
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/libpackagekit-glib2.so
439 %{_pkgconfigdir}/packagekit-glib2.pc
440 %{_pkgconfigdir}/packagekit-plugin.pc
441 %dir %{_includedir}/PackageKit
442 %{_includedir}/PackageKit/packagekit-glib2
443 %{_includedir}/PackageKit/plugin
444 %{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
445 %{_datadir}/gir-1.0/PackageKitPlugin-1.0.gir
446
447 %files static
448 %defattr(644,root,root,755)
449 %{_libdir}/libpackagekit-glib2.a
450
451 %files apidocs
452 %defattr(644,root,root,755)
453 %{_gtkdocdir}/PackageKit
454
455 %if %{with hawkey}
456 %files backend-hawkey
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_hawkey.so
459 %endif
460
461 %if %{with poldek}
462 %files backend-poldek
463 %defattr(644,root,root,755)
464 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_poldek.so
465 %endif
466
467 %if %{with smart}
468 %files backend-smart
469 %defattr(644,root,root,755)
470 %{_libdir}/packagekit-backend/libpk_backend_smart.so
471 %dir %{_datadir}/PackageKit/helpers/smart
472 %attr(755,root,root) %{_datadir}/PackageKit/helpers/smart/smartBackend.py
473 %endif
474
475 %if %{with yum}
476 %files backend-yum
477 %defattr(644,root,root,755)
478 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_yum.so
479 %dir %{_datadir}/PackageKit/helpers/yum
480 %{_datadir}/PackageKit/helpers/yum/licenses.txt
481 %{_datadir}/PackageKit/helpers/yum/yum-comps-groups.conf
482 %attr(755,root,root) %{_datadir}/PackageKit/helpers/yum/yumBackend.py
483 %{_datadir}/PackageKit/helpers/yum/yumComps.py[co]
484 %{_datadir}/PackageKit/helpers/yum/yumFilter.py[co]
485
486 # yum plugin
487 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/yum/pluginconf.d/refresh-packagekit.conf
488 %{_prefix}/lib/yum-plugins/refresh-packagekit.py
489 %endif
490
491 %files gstreamer-plugin
492 %defattr(644,root,root,755)
493 %doc contrib/gstreamer-plugin/README
494 %attr(755,root,root) %{_libdir}/gst-install-plugins-helper
495 %attr(755,root,root) %{_libdir}/pk-gstreamer-install
496
497 %files gtk-module
498 %defattr(644,root,root,755)
499 %doc contrib/gtk-module/{GLASS.txt,README}
500 %attr(755,root,root) %{_libdir}/gtk-2.0/modules/libpk-gtk-module.so
501
502 %files gtk3-module
503 %defattr(644,root,root,755)
504 %attr(755,root,root) %{_libdir}/gtk-3.0/modules/libpk-gtk-module.so
505 %{_libdir}/gnome-settings-daemon-3.0/gtk-modules/pk-gtk-module.desktop
506
507 %files -n bash-completion-packagekit
508 %defattr(644,root,root,755)
509 %{bash_compdir}/pkcon
510
511 %files -n python-packagekit
512 %defattr(644,root,root,755)
513 %dir %{py_sitescriptdir}/packagekit
514 %{py_sitescriptdir}/packagekit/*.py[co]
515
516 %if %{with browser}
517 %files -n browser-plugin-packagekit
518 %defattr(644,root,root,755)
519 %attr(755,root,root) %{_browserpluginsdir}/packagekit-plugin.so
520 %endif
This page took 0.128395 seconds and 4 git commands to generate.