Blob Blame History Raw
%define glib2_version           2.16.1
%define dbus_version            0.90
%define dbus_glib_version       0.70
%define policykit_version       0.7

%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Summary:   System daemon that is a DBUS abstraction layer for package management
Name:      PackageKit
Version:   0.3.10
Release:   3%{?dist}
License:   GPLv2+
Group:     System Environment/Libraries
URL:       http://packagekit.freedesktop.org
Source0:   http://www.packagekit.org/releases/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# Fedora-specific
# Set Vendor.conf up for Fedora.
Patch0:    PackageKit-0.3.8-Fedora-Vendor.conf.patch

# 636587097b68a4cfad3b5ef6929a7f37cf603a6d
Patch1:    PackageKit-0.3.10-fix-typo-in-remove.patch

Patch2:    PackageKit-0.3.11-add-missing-dbus-allow.patch

Requires: dbus >= %{dbus_version}
Requires: dbus-glib >= %{dbus_glib_version}
Requires: PackageKit-glib = %{version}-%{release}
Requires: PackageKit-udev-helper = %{version}-%{release}
Requires: PackageKit-yum-plugin = %{version}-%{release}
Requires: PackageKit-yum = %{version}-%{release}
Requires: shared-mime-info
Requires: python-sqlite2
Requires: comps-extras

BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: dbus-devel  >= %{dbus_version}
BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
BuildRequires: pam-devel
BuildRequires: libX11-devel
BuildRequires: libsexy-devel
BuildRequires: xmlto
BuildRequires: sqlite-devel
BuildRequires: NetworkManager-glib-devel
BuildRequires: PolicyKit-devel >= %{policykit_version}
BuildRequires: libtool
BuildRequires: docbook-utils
BuildRequires: gnome-doc-utils
BuildRequires: python-devel
BuildRequires: perl(XML::Parser)
BuildRequires: intltool
BuildRequires: gettext
BuildRequires: xulrunner-devel
BuildRequires: libarchive-devel
BuildRequires: gstreamer-devel
BuildRequires: gstreamer-plugins-base-devel
BuildRequires: qt4-devel
BuildRequires: cppunit-devel

%description
PackageKit is a D-Bus abstraction layer that allows the session user
to manage packages in a secure way using a cross-distro,
cross-architecture API.

%package yum
Summary: PackageKit YUM backend
Group: System Environment/Libraries
Requires: yum >= 3.2.19
Requires: %{name} = %{version}-%{release}

%description yum
A backend for PackageKit to enable yum functionality.

%package smart
Summary: PackageKit SMART backend
Group: System Environment/Libraries
Requires: smart
Requires: %{name} = %{version}-%{release}

%description smart
A backend for PackageKit to enable SMART functionality.

%package docs
Summary: Documentation for PackageKit
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description docs
API docs for PackageKit.

%package udev-helper
Summary: Tell PackageKit to install firmware that udev requires
Group: System Environment/Base
Requires: udev
Requires: PackageKit
Obsoletes: udev-packagekit < %{version}-%{release}

%description udev-helper
PackageKit-udev-helper tells PackageKit that firmware was not available and was
needed. This allows PackageKit to do the right thing and prompt for
the firmware to be installed.

%package yum-plugin
Summary: Tell PackageKit to check for updates when yum exits
Group: System Environment/Base
Requires: yum >= 3.0
Requires: PackageKit
Obsoletes: yum-packagekit < %{version}-%{release}

%description yum-plugin
PackageKit-yum-plugin tells PackageKit to check for updates when yum exits.
This way, if you run 'yum update' and install all available updates, puplet
will almost instantly update itself to reflect this.

%package glib
Summary: GLib libraries for accessing PackageKit
Group: Development/Libraries
Requires: dbus >= %{dbus_version}
Requires: %{name} = %{version}-%{release}
Obsoletes: PackageKit-libs < %{version}-%{release}
Provides: PackageKit-libs = %{version}-%{release}

%description glib
GLib libraries for accessing PackageKit.

%package qt
Summary: QT libraries for accessing PackageKit
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
# 2 short-lived rawhide pkgs
Obsoletes: packagekit-qt < 0.3.1
Obsoletes: qpackagekit < 0.3.1-2

%description qt
QT libraries for accessing PackageKit.

%package cron
Summary: Cron job and related utilities for PackageKit
Group: System Environment/Base
Requires: cronie
Requires: %{name} = %{version}-%{release}

%description cron
Crontab and utilities for running PackageKit as a cron job.

%package glib-devel
Summary: GLib Libraries and headers for PackageKit
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: dbus-devel >= %{dbus_version}
Requires: pkgconfig
Requires: sqlite-devel
Requires: PackageKit-glib = %{version}-%{release}
Obsoletes: PackageKit-devel < %{version}-%{release}
Provides: PackageKit-devel = %{version}-%{release}

%description glib-devel
GLib headers and libraries for PackageKit.

%package qt-devel
Summary: QT Libraries and headers for PackageKit
Group: Development/Libraries
Requires: %{name}-qt = %{version}-%{release}
Requires: pkgconfig
# 2 short-lived rawhide pkgs
Obsoletes: packagekit-qt-devel < 0.3.1
Obsoletes: qpackagekit-devel < 0.3.1-2

%description qt-devel
QT headers and libraries for PackageKit.

%package backend-devel
Summary: Headers to compile out of tree PackageKit backends
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description backend-devel
Headers to compile out of tree PackageKit backends.

%package browser-plugin
Summary: Browser Plugin for PackageKit
Group: Development/Libraries
Requires: gtk2
Requires: PackageKit-glib = %{version}-%{release}
Requires: mozilla-filesystem

%description browser-plugin
The PackageKit browser plugin allows web sites to offer the ability to
users to install and update packages from configured repositories
using PackageKit.

%package gstreamer-plugin
Summary: Install GStreamer codecs using PackageKit
Group: Development/Libraries
Requires: gstreamer
Requires: PackageKit-glib = %{version}-%{release}
Obsoletes: codeina < 0.10.1-10
Provides: codeina = 0.10.1-10

%description gstreamer-plugin
The PackageKit GStreamer plugin allows any Gstreamer application to install
codecs from configured repositories using PackageKit.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1

%build
%configure --enable-yum --enable-smart --with-default-backend=yum --disable-local

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

rm -f $RPM_BUILD_ROOT%{_libdir}/libpackagekit*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/libpackagekit*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/packagekit-plugin.a
rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/packagekit-plugin.la
chmod 755 $RPM_BUILD_ROOT%{_libexecdir}/PackageKitDbusTest.py
touch $RPM_BUILD_ROOT%{_localstatedir}/cache/PackageKit/groups.sqlite

# create a link that GStreamer will recognise
pushd ${RPM_BUILD_ROOT}%{_libexecdir} > /dev/null
ln -s pk-gstreamer-install gst-install-plugins-helper
popd > /dev/null

# create a link that from the comps icons to PK, as PackageKit frontends
# cannot add /usr/share/pixmaps/comps to the icon search path as some distros
# do not use comps. Patching this in the frontend is not a good idea, as there
# are multiple frontends in multiple programming languages.
pushd ${RPM_BUILD_ROOT}%{_datadir}/PackageKit > /dev/null
ln -s ../pixmaps/comps icons
popd > /dev/null

%find_lang %name

%clean
rm -rf $RPM_BUILD_ROOT

%post
update-mime-database %{_datadir}/mime &> /dev/null || :

# the job count used to live in /var/run, but it's now in /var/lib with the
# other persistent bits
if [ -e %{_localstatedir}/run/PackageKit/job_count.dat ]; then
	mv %{_localstatedir}/run/PackageKit/job_count.dat %{_localstatedir}/lib/PackageKit/job_count.dat
fi

%postun
update-mime-database %{_datadir}/mime &> /dev/null || :

%post glib -p /sbin/ldconfig
%post qt -p /sbin/ldconfig

%postun glib -p /sbin/ldconfig
%postun qt -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%dir %{_datadir}/PackageKit
%dir %{_datadir}/PackageKit/helpers
%dir %{_sysconfdir}/PackageKit
%dir %{_localstatedir}/lib/PackageKit
%dir %{python_sitelib}/packagekit
%dir %{_localstatedir}/cache/PackageKit
%ghost %verify(not md5 size mtime) %{_localstatedir}/cache/PackageKit/groups.sqlite
%dir %{_localstatedir}/cache/PackageKit/downloads
%{python_sitelib}/packagekit/*py*
%dir %{_sysconfdir}/bash_completion.d
%dir %{_libdir}/packagekit-backend
%config %{_sysconfdir}/bash_completion.d/pk-completion.bash
%config(noreplace) %{_sysconfdir}/PackageKit/*.conf
%config %{_sysconfdir}/dbus-1/system.d/*
%dir %{_datadir}/PackageKit/helpers/test_spawn
%dir %{_datadir}/PackageKit/icons
%{_datadir}/PackageKit/helpers/test_spawn/*
%{_datadir}/man/man1/*.1.gz
%{_datadir}/PolicyKit/policy/*.policy
%{_datadir}/mime/packages/packagekit-*.xml
%{_datadir}/PackageKit/pk-upgrade-distro.sh
%{_sbindir}/packagekitd
%{_bindir}/pkmon
%{_bindir}/pkcon
%{_bindir}/pkgenpack
%{_bindir}/packagekit-bugreport.sh
%exclude %{_libdir}/libpackagekit*.so.*
%{_libdir}/packagekit-backend/libpk_backend_dummy.so
%{_libdir}/packagekit-backend/libpk_backend_test_*.so
%ghost %verify(not md5 size mtime) %{_localstatedir}/lib/PackageKit/transactions.db
%ghost %verify(not md5 size mtime) %{_localstatedir}/lib/PackageKit/job_count.dat
%{_datadir}/dbus-1/system-services/*.service
%{_libdir}/pm-utils/sleep.d/95packagekit
%{_libexecdir}/*py*

%files docs
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%{_datadir}/gtk-doc/html/PackageKit

%files smart
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%{_libdir}/packagekit-backend/libpk_backend_smart.so
%dir %{_datadir}/PackageKit/helpers/smart
%{_datadir}/PackageKit/helpers/smart/*

%files yum
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%{_libdir}/packagekit-backend/libpk_backend_yum.so
%dir %{_datadir}/PackageKit/helpers/yum
%{_datadir}/PackageKit/helpers/yum/*

%files yum-plugin
%defattr(-, root, root)
%doc README AUTHORS NEWS COPYING
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/refresh-packagekit.conf
/usr/lib/yum-plugins/refresh-packagekit.*

%files udev-helper
%defattr(-, root, root)
%doc README AUTHORS NEWS COPYING
%{_sysconfdir}/udev/rules.d/*.rules
/lib/udev/*.sh

%files glib
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%{_libdir}/*packagekit-glib*.so.*

%files qt
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%{_libdir}/*packagekit-qt*.so.*

%files cron
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%config %{_sysconfdir}/cron.daily/packagekit-background.cron
%config(noreplace) %{_sysconfdir}/sysconfig/packagekit-background

%files browser-plugin
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%{_libdir}/mozilla/plugins/packagekit-plugin.so

%files gstreamer-plugin
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%{_libexecdir}/pk-gstreamer-install
%{_libexecdir}/gst-install-plugins-helper

%files glib-devel
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%{_libdir}/libpackagekit-glib*.so
%{_libdir}/pkgconfig/packagekit-glib.pc
%dir %{_includedir}/PackageKit
%dir %{_includedir}/PackageKit/packagekit-glib
%{_includedir}/PackageKit/packagekit-glib/*.h

%files qt-devel
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%{_libdir}/libpackagekit-qt*.so
%{_libdir}/pkgconfig/packagekit-qt.pc
%dir %{_includedir}/PackageKit
%dir %{_includedir}/PackageKit/packagekit-qt
%{_includedir}/PackageKit/packagekit-qt/QPackageKit
%{_includedir}/PackageKit/packagekit-qt/*.h
%{_datadir}/cmake/Modules/FindQPackageKit.cmake

%files backend-devel
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%dir %{_includedir}/PackageKit
%dir %{_includedir}/PackageKit/backend
%{_includedir}/PackageKit/backend/*.h

%changelog
* Sun Dec 07 2008 Colin Walters  <walters@verbum.org> - 0.3.10-3
- Add patch from F-10 stream for dbus
  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=475068

* Sun Nov 16 2008 Richard Hughes  <rhughes@redhat.com> - 0.3.10-2
- Don't check TID empty state in an action callback
- Fixes removing packages using packagekit-glib.

* Tue Nov 11 2008 Richard Hughes  <rhughes@redhat.com> - 0.3.10-1
- Backport new upstream version from F10.
- Drop all upstreamed patches

* Sat Sep 06 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.5-1
- New upstream version, only bugfixes.

* Sat Sep 06 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.4-8
- Backport a patch from stable so we include install-signature.py
  I really can't work out how this was dropped from 0.1.x to 0.2.x

* Wed Aug 27 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.4-7
- Fix resolving 64 bit packages on multiarch machines.
- Fixes rh#447957

* Wed Aug 27 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.4-6
- Dont crash 64 bit client tools when the daemon exits.
- Fixes rh#458215

* Fri Aug 15 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.4-5
- Don't blacklist apostrophe characters. Fixes rh#459155

* Wed Aug 06 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.4-4
- Fix up the yum backend as public_key.fingerprint() was changed.
- Fix detection of local files due to a silly typo.
- Fix pkcon what-provides '*' taking a long, long time.
- Fixes fd#16965.

* Wed Aug 06 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.4-3
- Check for a zero destination in the unix network fallback code.
- Fixes rh#445158.

* Mon Aug 04 2008 Robin Norwood <rnorwood@redhat.com> - 0.2.4-2
- Fix Source0 URL.

* Tue Jul 31 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.4-1
- New upstream version, only bugfixes.

* Tue Jul 15 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.3-6
- Own the /etc/bash_completion.d directory as we don't depend on the
  bash-completion package. Fixes rh#450964.

* Tue Jul 15 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.3-5
- Add intltool to the BR.

* Fri Jul 11 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.3-4
- Silence the output of update-mime-database to fix rh#454782

* Tue Jul 08 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.3-3
- Bump the soname so the upgrade of PackageKit-libs from 0.1.12 works --
  I really should have done this upstream when we broke ABI.

* Fri Jul 04 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.3-2
- Fix the .. release string.

* Fri Jul 04 2008 Richard Hughes  <rhughes@redhat.com> - 0.2.3-1
- New upstream stable version (API break from 0.1.12).
 * Multiple actions in one transaction
- Fixes many bugs with the 0.1.x codebase.

* Thu May 22 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-13.20080522
- Pull in the new snapshot from the stable PACKAGEKIT_0_1_X branch.
- Convert ';' characters in the update description to ',' to prevent crashing
  gpk-update-viewer. Fixes rh#447347
- Report to the user when the comps groups are invalid. Should fix rh#447162

* Tue May 20 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-12.20080520
- Pull in the new snapshot from the stable PACKAGEKIT_0_1_X branch.
- Fixes rh#446331.

* Tue May 06 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-11.20080506
- Pull in the new snapshot from the stable PACKAGEKIT_0_1_X branch.
- Fixes rh#445158.

* Mon May 05 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-10.20080505
- Pull in the new snapshot from the stable PACKAGEKIT_0_1_X branch.
- Fixes rh#445086, which should be a release blocker IMO.

* Thu May 02 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-9.20080502
- Pull in the new snapshot from the stable PACKAGEKIT_0_1_X branch.
- Fixes rh#444612, which is a release blocker.

* Thu Apr 30 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-8.20080425
- Bodge in some of the GPG import code from master in an attempt to be able to
  install signatures for F9.
- Fixes rh#443445, which is a release blocker.

* Thu Apr 25 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-7.20080425
- Pull in the new snapshot from the stable PACKAGEKIT_0_1_X branch.
- Fixes rh#443972.

* Thu Apr 24 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-6.20080424
- Pull in the new snapshot from the stable PACKAGEKIT_0_1_X branch.
- Fixes rh#443913.

* Wed Apr 23 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-5.20080423
- Pull in the new snapshot from the stable PACKAGEKIT_0_1_X branch.
- Fixes rh#443342, rh#443341, rh#443235, rh#443235 and rh#442166.

* Wed Apr 16 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-4.20080416git
- Urgh, actually upload the correct tarball.

* Wed Apr 16 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-3.20080416git
- Pull in the new snapshot from the stable PACKAGEKIT_0_1_X branch.
- Fixes rh#439735.

* Tue Apr 15 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-2.20080415git
- Pull in the new snapshot from the stable PACKAGEKIT_0_1_X branch.
- Fixes rh#442286, rh#442286 and quite a few upstream bugs.

* Sat Apr 12 2008 Richard Hughes  <rhughes@redhat.com> - 0.1.12-1.20080412git
- Pull in the new snapshot from the stable PACKAGEKIT_0_1_X branch.
- Fixes that were cherry picked into this branch since 0.1.11 was released can be viewed at:
  http://gitweb.freedesktop.org/?p=packagekit.git;a=log;h=PACKAGEKIT_0_1_X

* Sat Apr  5 2008 Matthias Clasen <mclasen@redhat.com> - 0.1.11-1
- Update to 0.1.11

* Fri Mar 28 2008 Bill Nottingham <notting@redhat.com> - 0.1.10-1
- update to 0.1.10
- fix glib buildreq

* Fri Mar 28 2008 Matthias Clasen <mclasen@redhat.com> - 0.1.9-3
- Fix a directory ownership oversight

* Mon Mar 17 2008 Robin Norwood <rnorwood@redhat.com> - 0.1.9-2
- Make PackageKit require yum-packagekit
- Resolves: rhbz#437539

* Wed Mar  5 2008 Robin Norwood <rnorwood@redhat.com> - 0.1.9-1
- Update to latest upstream version: 0.1.9
- Enable yum2 backend, but leave old yum backend the default for now

* Thu Feb 21 2008 Robin Norwood <rnorwood@redhat.com> - 0.1.8-1
- Update to latest upstream version: 0.1.8

* Mon Feb 18 2008 Robin Norwood <rnorwood@redhat.com> - 0.1.7-2
- Fix the yum backend.

* Thu Feb 14 2008 Robin Norwood <rnorwood@redhat.com> - 0.1.7-1
- Update to latest upstream version: 0.1.7

* Sat Jan 19 2008 Robin Norwood <rnorwood@redhat.com> - 0.1.6-1
- Update to latest upstream version: 0.1.6

* Fri Dec 21 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.5-1
- Update to latest upstream version: 0.1.5
- Remove polkit.patch for PolicyKit 0.7, no longer needed

* Mon Dec 17 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.4-3
- fix rpm -V issues by ghosting data files
- Resolves: rhbz#408401

* Sun Dec  9 2007 Matthias Clasen <mclasen@redhat.com> - 0.1.4-2
- Make it build against PolicyKit 0.7

* Tue Nov 27 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.4-1
- Update to latest upstream version: 0.1.4
- Include spec file changes from hughsie to add yum-packagekit subpackage

* Sat Nov 10 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.3-1
- Update to latest upstream version: 0.1.3

* Thu Nov 01 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.2-1
- Update to latest upstream version: 0.1.2

* Fri Oct 26 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.1-5
- More issues from package review:
- Need to own all created directories
- PackageKit-devel doesn't really require sqlite-devel
- Include docs in PackageKit-libs

* Fri Oct 26 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.1-4
- use with-default-backend instead of with-backend

* Thu Oct 25 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.1-3
- Add BR: python-devel

* Wed Oct 24 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.1-2
- doc cleanups from package review

* Tue Oct 23 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.1-1
- Update to latest upstream version

* Wed Oct 17 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.0-3
- Add BR for docbook-utils

* Tue Oct 16 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.0-2
- Apply recommended fixes from package review

* Mon Oct 15 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.0-1
- Initial build (based upon spec file from Richard Hughes)