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