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