29d5167
%define glib2_version           2.6.0
29d5167
%define dbus_version            0.90
29d5167
%define dbus_glib_version       0.70
29d5167
29d5167
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
29d5167
29d5167
Summary:   System daemon that is a DBUS abstraction layer for package management
29d5167
Name:      PackageKit
601b46b
Version:   0.1.4
1842abc
Release:   1%{?dist}
29d5167
License:   GPLv2+
29d5167
Group:     System Environment/Libraries
29d5167
URL:       http://www.packagekit.org
29d5167
Source0:   http://people.freedesktop.org/~hughsient/releases/PackageKit-%{version}.tar.gz
99d8475
Patch0:    polkit.patch
29d5167
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
29d5167
Requires:  dbus >= %{dbus_version}
29d5167
Requires:  PackageKit-libs = %{version}-%{release}
29d5167
Requires:  yum >= 3.2.6
29d5167
29d5167
BuildRequires: glib2-devel >= %{glib2_version}
29d5167
BuildRequires: dbus-devel  >= %{dbus_version}
29d5167
BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
29d5167
BuildRequires: pam-devel
29d5167
BuildRequires: libX11-devel
29d5167
BuildRequires: xmlto
29d5167
BuildRequires: sqlite-devel
29d5167
BuildRequires: NetworkManager-glib-devel
99d8475
BuildRequires: PolicyKit-devel >= 0.7
29d5167
BuildRequires: libtool
29d5167
BuildRequires: docbook-utils
29d5167
BuildRequires: python-devel
99d8475
BuildRequires: autoconf
29d5167
29d5167
29d5167
%description 
29d5167
PackageKit is a D-Bus abstraction layer that allows the session user
29d5167
to manage packages in a secure way using a cross-distro,
29d5167
cross-architecture API.
29d5167
601b46b
%package -n yum-packagekit
601b46b
Summary: Tell PackageKit to check for updates when yum exits
601b46b
Group: System Environment/Base
601b46b
Requires: yum >= 3.0
601b46b
Requires: PackageKit
601b46b
601b46b
%description -n yum-packagekit
601b46b
yum-packagekit tells PackageKit to check for updates when yum exits.
601b46b
This way, if you run 'yum update' and install all available updates, puplet
601b46b
will almost instantly update itself to reflect this.
601b46b
29d5167
%package libs
29d5167
Summary: Libraries for accessing PackageKit
29d5167
Group: Development/Libraries
29d5167
Requires: dbus >= %{dbus_version}
601b46b
Requires: %{name} = %{version}-%{release}
29d5167
29d5167
%description libs
29d5167
Libraries for accessing PackageKit.
29d5167
29d5167
%package devel
29d5167
Summary: Libraries and headers for PackageKit
29d5167
Group: Development/Libraries
29d5167
Requires: %{name} = %{version}-%{release}
29d5167
Requires: dbus-devel >= %{dbus_version}
29d5167
Requires: pkgconfig
29d5167
29d5167
%description devel
29d5167
Headers and libraries for PackageKit.
29d5167
29d5167
%prep
29d5167
%setup -q
99d8475
%patch0 -p1 -b .polkit
99d8475
99d8475
autoconf
29d5167
29d5167
%build
29d5167
%configure --with-default-backend=yum
29d5167
make %{?_smp_mflags}
29d5167
29d5167
%install
29d5167
rm -rf $RPM_BUILD_ROOT
29d5167
make install DESTDIR=$RPM_BUILD_ROOT
29d5167
29d5167
rm -f $RPM_BUILD_ROOT%{_libdir}/libpackagekit*.a
29d5167
rm -f $RPM_BUILD_ROOT%{_libdir}/libpackagekit*.la
29d5167
rm -f $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.la
29d5167
rm -f $RPM_BUILD_ROOT%{_libdir}/packagekit-backend/*.a
29d5167
29d5167
rm -f $RPM_BUILD_ROOT%{_datadir}/doc/packagekit/pk-reference.html
29d5167
29d5167
%clean
29d5167
rm -rf $RPM_BUILD_ROOT
29d5167
29d5167
%post libs -p /sbin/ldconfig
29d5167
29d5167
%postun libs -p /sbin/ldconfig
29d5167
29d5167
%files
29d5167
%defattr(-,root,root,-)
29d5167
%doc README AUTHORS NEWS COPYING 
29d5167
%doc docs/pk* docs/*.css
29d5167
%dir %{_datadir}/PackageKit
29d5167
%dir %{_datadir}/PackageKit/helpers
29d5167
%dir %{_sysconfdir}/PackageKit
29d5167
%dir %{_localstatedir}/run/PackageKit
601b46b
%{_sysconfdir}/bash_completion.d/pk-completion.bash
29d5167
%config(noreplace) %{_sysconfdir}/PackageKit/PackageKit.conf
8d44ef2
%config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.PackageKit.conf
29d5167
%{_datadir}/PackageKit/helpers/*
29d5167
%{_datadir}/man/man1/*.1.gz
29d5167
%{_datadir}/PolicyKit/policy/*.policy
29d5167
%{_sbindir}/packagekitd
29d5167
%{_bindir}/pkmon
29d5167
%{_bindir}/pkcon
29d5167
%{_localstatedir}/run/PackageKit/job_count.dat
29d5167
%{_localstatedir}/lib/PackageKit/
29d5167
%{_datadir}/dbus-1/system-services/*.service
29d5167
%{python_sitelib}/packagekit
29d5167
601b46b
%files -n yum-packagekit
601b46b
%defattr(-, root, root,-)
601b46b
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/refresh-packagekit.conf
dd193c4
%{_libdir}/yum-plugins/refresh-packagekit.*
601b46b
29d5167
%files libs
29d5167
%defattr(-,root,root,-)
29d5167
%doc README AUTHORS NEWS COPYING 
29d5167
%dir %{_libdir}/packagekit-backend
29d5167
%{_libdir}/*packagekit*.so.*
29d5167
%{_libdir}/packagekit-backend/*.so
29d5167
29d5167
%files devel
29d5167
%defattr(-,root,root,-)
29d5167
29d5167
%doc docs/pk* docs/*.css docs/*.xsl
29d5167
%{_libdir}/lib*.so
29d5167
%{_libdir}/pkgconfig/*
29d5167
%{_includedir}/*
29d5167
29d5167
%changelog
99d8475
* Sun Dec  9 2007 Matthias Clasen <mclasen@redhat.com> - 0.1.4-2
99d8475
- Make it build against PolicyKit 0.7
99d8475
601b46b
* Tue Nov 27 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.4-1
601b46b
- Update to latest upstream version: 0.1.4
601b46b
- Include spec file changes from hughsie to add yum-packagekit subpackage
601b46b
8d44ef2
* Sat Nov 10 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.3-1
8d44ef2
- Update to latest upstream version: 0.1.3
8d44ef2
1842abc
* Thu Nov 01 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.2-1
1842abc
- Update to latest upstream version: 0.1.2
1842abc
29d5167
* Fri Oct 26 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.1-5
29d5167
- More issues from package review:
29d5167
- Need to own all created directories
29d5167
- PackageKit-devel doesn't really require sqlite-devel
29d5167
- Include docs in PackageKit-libs
29d5167
29d5167
* Fri Oct 26 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.1-4
29d5167
- use with-default-backend instead of with-backend
29d5167
29d5167
* Thu Oct 25 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.1-3
29d5167
- Add BR: python-devel
29d5167
29d5167
* Wed Oct 24 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.1-2
29d5167
- doc cleanups from package review
29d5167
29d5167
* Tue Oct 23 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.1-1
29d5167
- Update to latest upstream version
29d5167
29d5167
* Wed Oct 17 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.0-3
29d5167
- Add BR for docbook-utils
29d5167
29d5167
* Tue Oct 16 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.0-2
29d5167
- Apply recommended fixes from package review
29d5167
29d5167
* Mon Oct 15 2007 Robin Norwood <rnorwood@redhat.com> - 0.1.0-1
29d5167
- Initial build (based upon spec file from Richard Hughes)