]> git.pld-linux.org Git - packages/PackageKit.git/blob - PackageKit.spec
- add smart backend, sort package order
[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:      qpackagekit
166
167 %description qt
168 packagekit-qt library.
169
170 %description qt -l pl.UTF-8
171 Biblioteka packagekit-qt.
172
173 %package qt-devel
174 Summary:        Header files for packagekit-qt library
175 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki packagekit-qt
176 Group:          Development/Libraries
177 Requires:       %{name}-qt = %{version}-%{release}
178 Requires:       QtCore-devel >= 4.4.0
179 Requires:       QtDBus-devel >= 4.4.0
180 Requires:       QtGui-devel >= 4.4.0
181 Requires:       QtSql-devel >= 4.4.0
182 Requires:       QtXml-devel >= 4.4.0
183 Obsoletes:      qpackagekit-devel
184
185 %description qt-devel
186 Header files for packagekit-qt library.
187
188 %description qt-devel -l pl.UTF-8
189 Pliki nagłówkowe biblioteki packagekit-qt.
190
191 %package qt-static
192 Summary:        Static packagekit-qt library
193 Summary(pl.UTF-8):      Statyczna biblioteka packagekit-qt
194 Group:          Development/Libraries
195 Requires:       %{name}-qt-devel = %{version}-%{release}
196
197 %description qt-static
198 Static packagekit-qt library.
199
200 %description qt-static -l pl.UTF-8
201 Statyczna biblioteka packagekit-qt.
202
203 %package apidocs
204 Summary:        PackageKit library API documentation
205 Summary(pl.UTF-8):      Dokumentacja API biblioteki PackageKit
206 Group:          Documentation
207 Requires:       gtk-doc-common
208
209 %description apidocs
210 PackageKit library API documentation.
211
212 %description apidocs -l pl.UTF-8
213 Dokumentacja API biblioteki PackageKit.
214
215 %package docs
216 Summary:        PackageKit documentation
217 Summary(pl.UTF-8):      Dokumentacja PackageKit
218 Group:          Documentation
219
220 %description docs
221 PackageKit documentation.
222
223 %description docs -l pl.UTF-8
224 Dokumentacja PackageKit.
225
226 %package gstreamer-plugin
227 Summary:        GStreamer codecs installer
228 Summary(pl.UTF-8):      Instalator kodeków GStreamera
229 Group:          Applications
230 Requires:       %{name} = %{version}-%{release}
231 Requires:       %{name}-gtk-module = %{version}-%{release}
232
233 %description gstreamer-plugin
234 The PackageKit GStreamer plugin allows any GStreamer application to
235 install codecs from configured repositories using PackageKit.
236
237 %description gstreamer-plugin -l pl.UTF-8
238 Wtyczka GStreamer pozwala każdej aplikacji używającej GStreamera
239 zainstalować kodeki ze skonfigurowanych źródeł PackageKit.
240
241 %package gtk-module
242 Summary:        GTK+ module to detect and install missing fonts
243 Summary(pl.UTF-8):      Moduł GTK+ do wykrywania i instalowania brakujących czcionek
244 Group:          X11/Libraries
245
246 %description gtk-module
247 The PackageKit GTK+ module allows any pango application to install
248 missing fonts from configured repositories using PackageKit.
249
250 %description gtk-module -l pl.UTF-8
251 Moduł GTK+ pozwala każdej aplikacji używającej pango zainstalować
252 brakującą czcionkę ze skonfigurowanych źródeł PackageKit.
253
254 %package gtk3-module
255 Summary:        GTK+ 3.x module to detect and install missing fonts
256 Summary(pl.UTF-8):      Moduł GTK+ 3.x do wykrywania i instalowania brakujących czcionek
257 Group:          X11/Libraries
258
259 %description gtk3-module
260 The PackageKit GTK+ 3.x module allows any pango application to install
261 missing fonts from configured repositories using PackageKit.
262
263 %description gtk3-module -l pl.UTF-8
264 Moduł GTK+ 3.x pozwala każdej aplikacji używającej pango zainstalować
265 brakującą czcionkę ze skonfigurowanych źródeł PackageKit.
266
267 %package -n bash-completion-packagekit
268 Summary:        bash-completion for PackageKit
269 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla PackageKit
270 Group:          Applications/Shells
271 Requires:       bash-completion
272
273 %description -n bash-completion-packagekit
274 This package provides bash-completion for PackageKit.
275
276 %description -n bash-completion-packagekit -l pl.UTF-8
277 Pakiet ten dostarcza bashowe uzupełnianie nazw dla PackageKit.
278
279 %package -n pm-utils-packagekit
280 Summary:        PackageKit script for pm-utils
281 Summary(pl.UTF-8):      Skrypt PackageKit dla pm-utils
282 Group:          Applications/System
283 Requires:       pm-utils
284
285 %description -n pm-utils-packagekit
286 PackageKit script for pm-utils.
287
288 %description -n pm-utils-packagekit -l pl.UTF-8
289 Skrypt PackageKit dla pm-utils.
290
291 %package -n python-packagekit
292 Summary:        PackageKit Python bindings
293 Summary(pl.UTF-8):      Wiązania PackageKit dla Pythona
294 Group:          Development/Languages/Python
295 Requires:       python-dbus
296 Requires:       python-pygobject
297
298 %description -n python-packagekit
299 PackageKit Python bindings.
300
301 %description -n python-packagekit -l pl.UTF-8
302 Wiązania PackageKit dla Pythona.
303
304 %package -n browser-plugin-packagekit
305 Summary:        PackageKit's browser plugin
306 Summary(pl.UTF-8):      Wtyczka PackageKit do przeglądarek WWW
307 Group:          X11/Libraries
308 Requires:       %{name} = %{version}-%{release}
309 Requires:       browser-plugins >= 2.0
310 Requires:       browser-plugins(%{_target_base_arch})
311
312 %description -n browser-plugin-packagekit
313 PackageKit's plugin for browsers.
314
315 %description -n browser-plugin-packagekit -l pl.UTF-8
316 Wtyczka PackageKit do przeglądarek WWW.
317
318 %prep
319 %setup -q
320 %patch1 -p1
321 %patch2 -p1
322
323 %build
324 %if %{with doc}
325 %{__gtkdocize}
326 %endif
327 %{__intltoolize}
328 %{__libtoolize}
329 %{__aclocal} -I m4
330 %{__autoconf}
331 %{__autoheader}
332 %{__automake}
333 %configure \
334         --disable-silent-rules \
335         --disable-dummy \
336         --disable-command-not-found \
337         %{!?with_gir:--disable-introspection} \
338         %{__enable_disable browser browser-plugin} \
339         %{__enable_disable poldek} \
340         %{__enable_disable smart} \
341         %{__enable_disable yum} \
342         %{__enable_disable dok gtk-doc}\
343         %{__enable_disable qt} \
344         --with-html-dir=%{_gtkdocdir} \
345         --with-default-backend=%{backend} \
346         --with-security-framework=polkit \
347         --with-mozilla-plugin-dir=%{_browserpluginsdir}
348 %{__make}
349
350 %install
351 rm -rf $RPM_BUILD_ROOT
352
353 %{__make} install \
354         DESTDIR=$RPM_BUILD_ROOT
355
356 # use pk-gstreamer-install as codec installer
357 ln -s pk-gstreamer-install $RPM_BUILD_ROOT%{_libdir}/gst-install-plugins-helper
358
359 install -d $RPM_BUILD_ROOT%{_libdir}/pm-utils/sleep.d
360 install -p contrib/pm-utils/95packagekit $RPM_BUILD_ROOT%{_libdir}/pm-utils/sleep.d
361
362 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gtk-{2,3}.0/modules/*.{la,a}
363 %{__rm} $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.{la,a}
364 %{__rm} $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/libpk_backend_test_*.so
365 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
366 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/test_spawn
367
368 %if %{with browser}
369 %{__rm} $RPM_BUILD_ROOT%{_browserpluginsdir}/*.{la,a}
370 %endif
371
372 %if %{with yum}
373 # yumBackend.py can't be compiled (invoked directly), other should be compiled
374 %py_comp $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum
375 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum
376 %{__rm} $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum/yum{Comps,Filter}.py
377 %{__rm} $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/yum/yumBackend.py[co]
378 %endif
379
380 %py_postclean
381
382 %find_lang %{name}
383
384 %clean
385 rm -rf $RPM_BUILD_ROOT
386
387 %post
388 %update_mime_database
389
390 %postun
391 %update_mime_database
392
393 %post   libs -p /sbin/ldconfig
394 %postun libs -p /sbin/ldconfig
395
396 %post   qt -p /sbin/ldconfig
397 %postun qt -p /sbin/ldconfig
398
399 %post -n browser-plugin-packagekit
400 %update_browser_plugins
401
402 %postun -n browser-plugin-packagekit
403 if [ "$1" = 0 ]; then
404         %update_browser_plugins
405 fi
406
407 %files -f %{name}.lang
408 %defattr(644,root,root,755)
409 %doc AUTHORS ChangeLog HACKING NEWS README TODO
410 %attr(755,root,root) %{_bindir}/packagekit-bugreport.sh
411 %attr(755,root,root) %{_bindir}/pkcon
412 %attr(755,root,root) %{_bindir}/pkgenpack
413 %attr(755,root,root) %{_bindir}/pkmon
414 %attr(755,root,root) %{_bindir}/pk-debuginfo-install
415 %attr(750,root,root) /etc/cron.daily/packagekit-background.cron
416 %dir %{_libdir}/packagekit-backend
417 %attr(755,root,root) %{_libdir}/packagekitd
418 %attr(755,root,root) %{_sbindir}/pk-device-rebind
419 %dir %{_sysconfdir}/PackageKit
420 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/PackageKit.conf
421 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/Vendor.conf
422 %dir %{_sysconfdir}/PackageKit/events
423 %{_sysconfdir}/PackageKit/events/post-transaction.d
424 %{_sysconfdir}/PackageKit/events/pre-transaction.d
425 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/packagekit-background
426 /etc/dbus-1/system.d/org.freedesktop.PackageKit.conf
427 %dir %{_datadir}/PackageKit
428 %dir %{_datadir}/PackageKit/helpers
429 %attr(755,root,root) %{_datadir}/PackageKit/pk-upgrade-distro.sh
430 %{_datadir}/polkit-1/actions/org.freedesktop.packagekit.policy
431 %{_datadir}/dbus-1/system-services/org.freedesktop.PackageKit.service
432 %{_datadir}/mime/packages/packagekit-catalog.xml
433 %{_datadir}/mime/packages/packagekit-package-list.xml
434 %{_datadir}/mime/packages/packagekit-servicepack.xml
435 %{_mandir}/man1/pkcon.1*
436 %{_mandir}/man1/pk-debuginfo-install.1*
437 %{_mandir}/man1/pk-device-rebind.1*
438 %{_mandir}/man1/pkgenpack.1*
439 %{_mandir}/man1/pkmon.1*
440 %dir /var/cache/PackageKit
441 %dir /var/cache/PackageKit/downloads
442 %dir /var/lib/PackageKit
443 %ghost /var/lib/PackageKit/transactions.db
444
445 %files libs
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_libdir}/libpackagekit-glib2.so.*.*.*
448 %attr(755,root,root) %ghost %{_libdir}/libpackagekit-glib2.so.14
449 %{_libdir}/girepository-1.0/PackageKitGlib-1.0.typelib
450
451 %files devel
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_libdir}/libpackagekit-glib2.so
454 %{_pkgconfigdir}/packagekit-glib2.pc
455 %dir %{_includedir}/PackageKit
456 %{_includedir}/PackageKit/backend
457 %{_includedir}/PackageKit/packagekit-glib2
458 %{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
459
460 %files static
461 %defattr(644,root,root,755)
462 %{_libdir}/libpackagekit-glib2.a
463
464 %if %{with poldek}
465 %files backend-poldek
466 %defattr(644,root,root,755)
467 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_poldek.so
468 %endif
469
470 %if %{with smart}
471 %files backend-smart
472 %defattr(644,root,root,755)
473 %{_libdir}/packagekit-backend/libpk_backend_smart.so
474 %dir %{_datadir}/PackageKit/helpers/smart
475 %{_datadir}/PackageKit/helpers/smart/*
476 %endif
477
478 %if %{with yum}
479 %files backend-yum
480 %defattr(644,root,root,755)
481 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/Yum.conf
482 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_yum.so
483 %dir %{_datadir}/PackageKit/helpers/yum
484 %{_datadir}/PackageKit/helpers/yum/licenses.txt
485 %{_datadir}/PackageKit/helpers/yum/yum-comps-groups.conf
486 %attr(755,root,root) %{_datadir}/PackageKit/helpers/yum/yumBackend.py
487 %{_datadir}/PackageKit/helpers/yum/yumComps.py[co]
488 %{_datadir}/PackageKit/helpers/yum/yumFilter.py[co]
489
490 # yum plugin
491 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/yum/pluginconf.d/refresh-packagekit.conf
492 %{_prefix}/lib/yum-plugins/refresh-packagekit.py
493 %endif
494
495 %if %{with qt}
496 %files qt
497 %defattr(644,root,root,755)
498 %attr(755,root,root) %{_libdir}/libpackagekit-qt.so.*.*.*
499 %attr(755,root,root) %ghost %{_libdir}/libpackagekit-qt.so.14
500
501 %files qt-devel
502 %defattr(644,root,root,755)
503 %attr(755,root,root) %{_libdir}/libpackagekit-qt.so
504 %{_pkgconfigdir}/packagekit-qt.pc
505 %{_includedir}/PackageKit/packagekit-qt
506 %{_datadir}/cmake/Modules/FindQPackageKit.cmake
507
508 %files qt-static
509 %defattr(644,root,root,755)
510 %{_libdir}/libpackagekit-qt.a
511 %endif
512
513 %files apidocs
514 %defattr(644,root,root,755)
515 %{_gtkdocdir}/PackageKit
516
517 %files docs
518 %defattr(644,root,root,755)
519 %{_datadir}/PackageKit/website
520
521 %files gstreamer-plugin
522 %defattr(644,root,root,755)
523 %doc contrib/gstreamer-plugin/README
524 %attr(755,root,root) %{_libdir}/gst-install-plugins-helper
525 %attr(755,root,root) %{_libdir}/pk-gstreamer-install
526
527 %files gtk-module
528 %defattr(644,root,root,755)
529 %doc contrib/gtk-module/{GLASS.txt,README}
530 %attr(755,root,root) %{_libdir}/gtk-2.0/modules/libpk-gtk-module.so
531
532 %files gtk3-module
533 %defattr(644,root,root,755)
534 %attr(755,root,root) %{_libdir}/gtk-3.0/modules/libpk-gtk-module.so
535
536 %files -n bash-completion-packagekit
537 %defattr(644,root,root,755)
538 %{_sysconfdir}/bash_completion.d/pk-completion.bash
539
540 %files -n pm-utils-packagekit
541 %defattr(644,root,root,755)
542 %attr(755,root,root) %{_libdir}/pm-utils/sleep.d/95packagekit
543
544 %files -n python-packagekit
545 %defattr(644,root,root,755)
546 %dir %{py_sitescriptdir}/packagekit
547 %{py_sitescriptdir}/packagekit/*.py[co]
548
549 %if %{with browser}
550 %files -n browser-plugin-packagekit
551 %defattr(644,root,root,755)
552 %attr(755,root,root) %{_browserpluginsdir}/packagekit-plugin.so
553 %endif
This page took 0.058287 seconds and 4 git commands to generate.