- added hif backend as replacement of hawkey
[packages/PackageKit.git] / PackageKit.spec
CommitLineData
d05d9108
MB
1# TODO:
2# - BASH command-not-found functionality disabled for now as it needs patched bash
3# (details in bash from Fedora Rawhide)
d05d9108
MB
4#
5# Conditional build:
53810c7c
JB
6%bcond_without doc # build without docs
7%bcond_without introspection # gobject introspection, time to time broken
ee375c30 8%bcond_with hif # HIF backend
53810c7c 9%bcond_without poldek # Poldek backend
02b3d2d3 10%bcond_with python # Python binding (only for a few backends)
53810c7c 11%bcond_with browser # browser plugin (patrys says: it's flawed by concept)
dc10d5ba 12
85d27e4f
JB
13Summary: System daemon that is a D-Bus abstraction layer for package management
14Summary(pl.UTF-8): Demon systemowy będący warstwą abstrakcji D-Bus do zarządzania pakietami
a2d83637 15Name: PackageKit
02b3d2d3
JB
16Version: 1.0.4
17Release: 1
a2d83637 18License: GPL v2+
85d27e4f 19Group: Applications/System
66e86606 20Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
02b3d2d3
JB
21# Source0-md5: 4a07aa7e4c76052b2edf0765c26d2e35
22Patch0: %{name}-poldek.patch
23Patch1: %{name}-bashcomp.patch
a2d83637
MB
24URL: http://www.packagekit.org/
25BuildRequires: NetworkManager-devel >= 0.6.5
ee375c30 26%{?with_hif:BuildRequires: appstream-glib-devel}
600be41c 27BuildRequires: autoconf >= 2.65
577193a4
JB
28BuildRequires: automake >= 1:1.11
29BuildRequires: connman-devel
6808f644 30BuildRequires: dbus-devel >= 1.2.0
f5f5e3ff 31BuildRequires: dbus-glib-devel >= 0.76
bdd8c0ca 32BuildRequires: docbook-dtd412-xml
33BuildRequires: docbook-dtd42-xml
dac2b5e1 34BuildRequires: fontconfig-devel
a0f1aeda 35BuildRequires: gettext-tools
53810c7c
JB
36BuildRequires: glib2-devel >= 1:2.32.0
37%{?with_introspection:BuildRequires: gobject-introspection-devel >= 0.9.9}
7cd3cbcf
MB
38BuildRequires: gstreamer-devel >= 1.0.0
39BuildRequires: gstreamer-plugins-base-devel >= 1.0.0
d05d9108 40BuildRequires: gtk+2-devel >= 2:2.14.0
dac2b5e1 41BuildRequires: gtk+3-devel >= 3.0.0
577193a4 42%{?with_doc:BuildRequires: gtk-doc >= 1.11}
d05d9108 43BuildRequires: intltool >= 0.35.0
78293e06 44BuildRequires: libarchive-devel
ee375c30 45%{?with_hif:BuildRequires: libhif-devel >= 0.1.7}
a2d83637 46BuildRequires: libtool
dac2b5e1
AF
47BuildRequires: libxslt-progs
48BuildRequires: pango-devel
a2d83637 49BuildRequires: pkgconfig
7cd3cbcf 50%{?with_poldek:BuildRequires: poldek-devel >= 0.30-1.rc6.4}
577193a4 51BuildRequires: polkit-devel >= 0.98
02b3d2d3 52%{?with_python:BuildRequires: python-devel >= 1:2.7}
827cd5e7 53BuildRequires: readline-devel
a2d83637 54BuildRequires: rpm-pythonprov
85d27e4f 55BuildRequires: rpmbuild(macros) >= 1.311
577193a4
JB
56BuildRequires: sqlite3-devel >= 3
57BuildRequires: systemd-devel
e216f3d9 58BuildRequires: tar >= 1:1.22
9ed4ca79 59BuildRequires: udev-glib-devel
e216f3d9 60BuildRequires: xz
dac2b5e1
AF
61%if %{with browser}
62BuildRequires: cairo-devel
a92a33f7
ŁK
63BuildRequires: nspr-devel >= 4.8
64BuildRequires: xulrunner-devel >= 8.0
dac2b5e1 65%endif
fcd0bc5c 66Requires(post,postun): shared-mime-info
0d5f415c 67Requires: %{name}-backend
a2d83637 68Requires: %{name}-libs = %{version}-%{release}
5d2bfc22 69Requires: ConsoleKit-x11
8d48627e 70Requires: crondaemon
53810c7c 71Requires: polkit >= 0.98
02b3d2d3
JB
72Obsoletes: PackageKit-backend-smart
73Obsoletes: PackageKit-backend-yum
7cd3cbcf 74Obsoletes: PackageKit-docs < 0.8.4
d113818a 75Obsoletes: pm-utils-packagekit
a2d83637
MB
76BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
77
78%description
79PackageKit is a D-Bus abstraction layer that allows the session user
80to manage packages in a secure way using a cross-distro,
81cross-architecture API.
82
85d27e4f
JB
83%description -l pl.UTF-8
84PackageKit to warstwa abstrakcji D-Bus pozwalająca użytkownikowi
85sesyjnemu w bezpieczny sposob zarządzać pakietami przy użyciu API
86zgodnego z wieloma dystrybucjami i architekturami.
87
a2d83637 88%package libs
d05d9108
MB
89Summary: packagekit-glib library
90Summary(pl.UTF-8): Biblioteka packagekit-glib
a2d83637 91Group: Libraries
53810c7c 92Requires: glib2 >= 1:2.32.0
a2d83637
MB
93
94%description libs
d05d9108 95packagekit-glib library.
a2d83637
MB
96
97%description libs -l pl.UTF-8
d05d9108 98Biblioteka packagekit-glib.
a2d83637
MB
99
100%package devel
d05d9108
MB
101Summary: Header files for packagekit-glib library
102Summary(pl.UTF-8): Pliki nagłówkowe biblioteki packagekit-glib
a2d83637
MB
103Group: Development/Libraries
104Requires: %{name}-libs = %{version}-%{release}
9ed4ca79 105Requires: dbus-devel >= 1.2.0
53810c7c 106Requires: glib2-devel >= 1:2.32.0
9ed4ca79 107Requires: sqlite3-devel
a2d83637
MB
108
109%description devel
d05d9108 110Header files for packagekit-glib library.
a2d83637
MB
111
112%description devel -l pl.UTF-8
d05d9108 113Pliki nagłówkowe biblioteki packagekit-glib.
a2d83637
MB
114
115%package static
d05d9108
MB
116Summary: Static packagekit-glib library
117Summary(pl.UTF-8): Statyczna biblioteka packagekit-glib
a2d83637
MB
118Group: Development/Libraries
119Requires: %{name}-devel = %{version}-%{release}
120
121%description static
d05d9108 122Static packagekit-glib library.
a2d83637
MB
123
124%description static -l pl.UTF-8
d05d9108
MB
125Statyczna biblioteka packagekit-glib.
126
16acf8d5
JB
127%package apidocs
128Summary: PackageKit library API documentation
129Summary(pl.UTF-8): Dokumentacja API biblioteki PackageKit
130Group: Documentation
131Requires: gtk-doc-common
2aa4ef3d
ER
132%if "%{_rpmversion}" >= "5"
133BuildArch: noarch
134%endif
16acf8d5
JB
135
136%description apidocs
137PackageKit library API documentation.
138
139%description apidocs -l pl.UTF-8
140Dokumentacja API biblioteki PackageKit.
141
ee375c30
JB
142%package backend-hif
143Summary: PackageKit hif backend
144Summary(pl.UTF-8): Backend PackageKit oparty na bibliotece hif
145Group: Libraries
146Requires: %{name} = %{version}-%{release}
147Requires: libhif >= 0.1.7
148Provides: %{name}-backend = %{version}-%{release}
149Obsoletes: PackageKit-backend-hawkey
150Conflicts: PackageKit < 0.6.8-3
151
152%description backend-hif
153A backend for PackageKit to enable hif functionality.
154
155%description backend-hif -l pl.UTF-8
156Backend PackageKit dodający obsługę biblioteki hif.
157
0d5f415c
ER
158%package backend-poldek
159Summary: PackageKit Poldek backend
16acf8d5 160Summary(pl.UTF-8): Backend PackageKit oparty na Poldku
0d5f415c
ER
161Group: Libraries
162Requires: %{name} = %{version}-%{release}
7cd3cbcf 163Requires: poldek >= 0.30-1.rc6.4
16acf8d5
JB
164Provides: %{name}-backend = %{version}-%{release}
165Conflicts: PackageKit < 0.6.8-3
0d5f415c
ER
166
167%description backend-poldek
168A backend for PackageKit to enable Poldek functionality.
169
16acf8d5
JB
170%description backend-poldek -l pl.UTF-8
171Backend PackageKit dodający obsługę Poldka.
172
d05d9108
MB
173%package gstreamer-plugin
174Summary: GStreamer codecs installer
175Summary(pl.UTF-8): Instalator kodeków GStreamera
176Group: Applications
177Requires: %{name} = %{version}-%{release}
5baab3aa 178Requires: %{name}-gtk-module = %{version}-%{release}
d05d9108
MB
179
180%description gstreamer-plugin
181The PackageKit GStreamer plugin allows any GStreamer application to
182install codecs from configured repositories using PackageKit.
183
184%description gstreamer-plugin -l pl.UTF-8
185Wtyczka GStreamer pozwala każdej aplikacji używającej GStreamera
186zainstalować kodeki ze skonfigurowanych źródeł PackageKit.
187
188%package gtk-module
189Summary: GTK+ module to detect and install missing fonts
190Summary(pl.UTF-8): Moduł GTK+ do wykrywania i instalowania brakujących czcionek
191Group: X11/Libraries
192
193%description gtk-module
194The PackageKit GTK+ module allows any pango application to install
195missing fonts from configured repositories using PackageKit.
196
197%description gtk-module -l pl.UTF-8
198Moduł GTK+ pozwala każdej aplikacji używającej pango zainstalować
199brakującą czcionkę ze skonfigurowanych źródeł PackageKit.
200
dac2b5e1
AF
201%package gtk3-module
202Summary: GTK+ 3.x module to detect and install missing fonts
203Summary(pl.UTF-8): Moduł GTK+ 3.x do wykrywania i instalowania brakujących czcionek
204Group: X11/Libraries
205
206%description gtk3-module
207The PackageKit GTK+ 3.x module allows any pango application to install
208missing fonts from configured repositories using PackageKit.
209
210%description gtk3-module -l pl.UTF-8
211Moduł GTK+ 3.x pozwala każdej aplikacji używającej pango zainstalować
212brakującą czcionkę ze skonfigurowanych źródeł PackageKit.
213
a2d83637 214%package -n bash-completion-packagekit
16acf8d5
JB
215Summary: Bash completion for PackageKit console commands
216Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla poleceń konsolowych PackageKit
a2d83637 217Group: Applications/Shells
577193a4
JB
218Requires: %{name} = %{version}-%{release}
219Requires: bash-completion >= 2
ead2d2f6
ER
220%if "%{_rpmversion}" >= "5"
221BuildArch: noarch
222%endif
a2d83637
MB
223
224%description -n bash-completion-packagekit
16acf8d5 225This package provides bash-completion for PackageKit console commands.
a2d83637
MB
226
227%description -n bash-completion-packagekit -l pl.UTF-8
16acf8d5
JB
228Pakiet ten dostarcza bashowe uzupełnianie parametrów dla poleceń
229konsolowych PackageKit.
a2d83637 230
a2d83637
MB
231%package -n python-packagekit
232Summary: PackageKit Python bindings
233Summary(pl.UTF-8): Wiązania PackageKit dla Pythona
234Group: Development/Languages/Python
235Requires: python-dbus
236Requires: python-pygobject
237
238%description -n python-packagekit
239PackageKit Python bindings.
240
86086d14 241%description -n python-packagekit -l pl.UTF-8
a2d83637
MB
242Wiązania PackageKit dla Pythona.
243
dac2b5e1
AF
244%package -n browser-plugin-packagekit
245Summary: PackageKit's browser plugin
246Summary(pl.UTF-8): Wtyczka PackageKit do przeglądarek WWW
247Group: X11/Libraries
248Requires: %{name} = %{version}-%{release}
249Requires: browser-plugins >= 2.0
250Requires: browser-plugins(%{_target_base_arch})
251
252%description -n browser-plugin-packagekit
253PackageKit's plugin for browsers.
254
255%description -n browser-plugin-packagekit -l pl.UTF-8
256Wtyczka PackageKit do przeglądarek WWW.
257
a2d83637
MB
258%prep
259%setup -q
d113818a 260%patch0 -p1
02b3d2d3 261%patch1 -p1
a2d83637
MB
262
263%build
9b8153ef 264%if %{with doc}
d05d9108 265%{__gtkdocize}
d5617342 266%endif
58e98be4 267%{__intltoolize}
a2d83637 268%{__libtoolize}
d05d9108 269%{__aclocal} -I m4
a2d83637
MB
270%{__autoconf}
271%{__autoheader}
272%{__automake}
273%configure \
d05d9108 274 --disable-command-not-found \
577193a4
JB
275 --disable-dummy \
276 %{!?with_doc:--disable-gtk-doc} \
53810c7c 277 %{!?with_introspection:--disable-introspection} \
577193a4
JB
278 --disable-silent-rules \
279 --enable-bash-completion=%{bash_compdir} \
dac2b5e1 280 %{__enable_disable browser browser-plugin} \
ee375c30 281 %{__enable_disable hif} \
dac2b5e1 282 %{__enable_disable poldek} \
577193a4
JB
283 --with-html-dir=%{_gtkdocdir} \
284 --with-mozilla-plugin-dir=%{_browserpluginsdir} \
285 --with-security-framework=polkit
a2d83637
MB
286%{__make}
287
288%install
289rm -rf $RPM_BUILD_ROOT
290
291%{__make} install \
292 DESTDIR=$RPM_BUILD_ROOT
293
d05d9108
MB
294# use pk-gstreamer-install as codec installer
295ln -s pk-gstreamer-install $RPM_BUILD_ROOT%{_libdir}/gst-install-plugins-helper
296
dac2b5e1
AF
297%{__rm} $RPM_BUILD_ROOT%{_libdir}/gtk-{2,3}.0/modules/*.{la,a}
298%{__rm} $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.{la,a}
299%{__rm} $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/libpk_backend_test_*.so
300%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
301%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/PackageKit/helpers/test_spawn
302
303%if %{with browser}
304%{__rm} $RPM_BUILD_ROOT%{_browserpluginsdir}/*.{la,a}
305%endif
a2d83637 306
02b3d2d3
JB
307# empty version of bg
308%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/bg_BG
309# empty version of fa (empty as well BTW)
310%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/fa_IR
311# outdated copy of it
312%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/it_IT
9fced724 313
a2d83637
MB
314%py_postclean
315
6808f644
MB
316%find_lang %{name}
317
a2d83637
MB
318%clean
319rm -rf $RPM_BUILD_ROOT
320
fcd0bc5c
MB
321%post
322%update_mime_database
323
324%postun
325%update_mime_database
326
85d27e4f 327%post libs -p /sbin/ldconfig
a2d83637
MB
328%postun libs -p /sbin/ldconfig
329
dac2b5e1
AF
330%post -n browser-plugin-packagekit
331%update_browser_plugins
332
333%postun -n browser-plugin-packagekit
334if [ "$1" = 0 ]; then
335 %update_browser_plugins
336fi
337
6808f644 338%files -f %{name}.lang
a2d83637 339%defattr(644,root,root,755)
02b3d2d3 340%doc AUTHORS HACKING MAINTAINERS NEWS README
a2d83637
MB
341%attr(755,root,root) %{_bindir}/pkcon
342%attr(755,root,root) %{_bindir}/pkmon
50832223 343%attr(750,root,root) /etc/cron.daily/packagekit-background.cron
02b3d2d3
JB
344%attr(755,root,root) %{_libexecdir}/packagekit-direct
345%attr(755,root,root) %{_libexecdir}/packagekitd
346%attr(755,root,root) %{_libexecdir}/pk-offline-update
a2d83637 347%dir %{_libdir}/packagekit-backend
a2d83637
MB
348%dir %{_sysconfdir}/PackageKit
349%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/PackageKit.conf
d05d9108 350%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/Vendor.conf
5baab3aa
ER
351%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/packagekit-background
352/etc/dbus-1/system.d/org.freedesktop.PackageKit.conf
d05d9108 353%dir %{_datadir}/PackageKit
6e66a3a4 354%dir %{_datadir}/PackageKit/helpers
d05d9108 355%attr(755,root,root) %{_datadir}/PackageKit/pk-upgrade-distro.sh
f058dba9 356%{_datadir}/polkit-1/actions/org.freedesktop.packagekit.policy
577193a4 357%{_datadir}/polkit-1/rules.d/org.freedesktop.packagekit.rules
a2d83637 358%{_datadir}/dbus-1/system-services/org.freedesktop.PackageKit.service
a2d83637 359%{_mandir}/man1/pkcon.1*
78293e06 360%{_mandir}/man1/pkmon.1*
53810c7c 361%{systemdunitdir}/packagekit.service
7cd3cbcf 362%{systemdunitdir}/packagekit-offline-update.service
02b3d2d3
JB
363%dir %{systemdunitdir}/system-update.target.wants
364%{systemdunitdir}/system-update.target.wants/packagekit-offline-update.service
78293e06
MB
365%dir /var/cache/PackageKit
366%dir /var/cache/PackageKit/downloads
a2d83637 367%dir /var/lib/PackageKit
d05d9108 368%ghost /var/lib/PackageKit/transactions.db
a2d83637
MB
369
370%files libs
371%defattr(644,root,root,755)
74872af2 372%attr(755,root,root) %{_libdir}/libpackagekit-glib2.so.*.*.*
02b3d2d3 373%attr(755,root,root) %ghost %{_libdir}/libpackagekit-glib2.so.18
dac2b5e1 374%{_libdir}/girepository-1.0/PackageKitGlib-1.0.typelib
2ab9cd42
JB
375# NOTE: dbus interface xmls are commonly used:
376# - at runtime by packagekitd
377# - for development of applications using PK dbus interface
378%{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.Transaction.xml
379%{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.xml
08c67dac 380
a2d83637
MB
381%files devel
382%defattr(644,root,root,755)
74872af2 383%attr(755,root,root) %{_libdir}/libpackagekit-glib2.so
74872af2 384%{_pkgconfigdir}/packagekit-glib2.pc
d05d9108 385%dir %{_includedir}/PackageKit
74872af2 386%{_includedir}/PackageKit/packagekit-glib2
dac2b5e1 387%{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
08c67dac 388
a2d83637
MB
389%files static
390%defattr(644,root,root,755)
74872af2 391%{_libdir}/libpackagekit-glib2.a
d05d9108 392
16acf8d5
JB
393%files apidocs
394%defattr(644,root,root,755)
395%{_gtkdocdir}/PackageKit
396
0d5f415c
ER
397%if %{with poldek}
398%files backend-poldek
399%defattr(644,root,root,755)
400%attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_poldek.so
401%endif
402
ee375c30
JB
403%if %{with hif}
404%files backend-hif
405%defattr(644,root,root,755)
406%attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_hif.so
407%endif
408
d05d9108
MB
409%files gstreamer-plugin
410%defattr(644,root,root,755)
411%doc contrib/gstreamer-plugin/README
02b3d2d3
JB
412%attr(755,root,root) %{_libexecdir}/gst-install-plugins-helper
413%attr(755,root,root) %{_libexecdir}/pk-gstreamer-install
d05d9108
MB
414
415%files gtk-module
416%defattr(644,root,root,755)
417%doc contrib/gtk-module/{GLASS.txt,README}
418%attr(755,root,root) %{_libdir}/gtk-2.0/modules/libpk-gtk-module.so
419
dac2b5e1
AF
420%files gtk3-module
421%defattr(644,root,root,755)
422%attr(755,root,root) %{_libdir}/gtk-3.0/modules/libpk-gtk-module.so
7cd3cbcf 423%{_libdir}/gnome-settings-daemon-3.0/gtk-modules/pk-gtk-module.desktop
dac2b5e1 424
a2d83637
MB
425%files -n bash-completion-packagekit
426%defattr(644,root,root,755)
577193a4 427%{bash_compdir}/pkcon
a2d83637 428
02b3d2d3 429%if %{with python}
a2d83637
MB
430%files -n python-packagekit
431%defattr(644,root,root,755)
432%dir %{py_sitescriptdir}/packagekit
433%{py_sitescriptdir}/packagekit/*.py[co]
02b3d2d3 434%endif
dac2b5e1
AF
435
436%if %{with browser}
437%files -n browser-plugin-packagekit
438%defattr(644,root,root,755)
439%attr(755,root,root) %{_browserpluginsdir}/packagekit-plugin.so
440%endif
This page took 0.324323 seconds and 4 git commands to generate.