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