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