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