PackageKit/PackageKit.spec
Vincent Untz 1bb3922ceb Accepting request 37620 from home:vuntz:branches:GNOME:Factory
Copy from home:vuntz:branches:GNOME:Factory/PackageKit via accept of submit request 37620 revision 2.
Request was accepted with message:
Forwarding to openSUSE:Factory

OBS-URL: https://build.opensuse.org/request/show/37620
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/PackageKit?expand=0&rev=58
2010-04-10 00:26:48 +00:00

411 lines
14 KiB
RPMSpec

#
# spec file for package PackageKit (Version 0.6.3)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# We disable the command-not-found handler because the zypp backend cannot find
# files from non-installed packages. Enable the build once this works:
# $ pkcon search file /usr/bin/anjuta
%define BUILD_CNF 0
%if 0%{suse_version} > 1120
%define xulrunner_version 192
%else
%if 0%{suse_version} > 1110
%define xulrunner_version 191
%else
%define xulrunner_version 190
%endif
%endif
Name: PackageKit
Version: 0.6.3
Release: 1
License: GPLv2+
BuildRequires: NetworkManager-devel
BuildRequires: dbus-1-glib-devel
BuildRequires: docbook-utils
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gobject-introspection-devel
BuildRequires: gstreamer-0_10-devel
BuildRequires: gstreamer-0_10-plugins-base-devel
BuildRequires: gtk-doc
BuildRequires: gtk2-devel
BuildRequires: intltool
BuildRequires: libarchive-devel
BuildRequires: libcppunit-devel
BuildRequires: libgudev-1_0-devel
BuildRequires: libqt4-devel
BuildRequires: libzypp-devel
BuildRequires: mozilla-xulrunner%{xulrunner_version}-devel
BuildRequires: pm-utils
BuildRequires: polkit-devel
BuildRequires: python-devel
BuildRequires: sqlite-devel
Group: System/Daemons
Summary: Simple software installation management software
Url: http://packagekit.org/
Source: %{name}-%{version}.tar.bz2
# PATCH-FEATURE-OPENSUSE PackageKit-sysconfig-cron.patch vuntz@opensuse.org -- Change the configuration of the cron script to a sysconfig-like config
Patch0: PackageKit-sysconfig-cron.patch
# PATCH-FIX-UPSTREAM PackageKit-libzypp6.patch fdo#20366
Patch2: PackageKit-libzypp6.patch
# PATCH-FIX-UPSTREAM PackageKit-BNC559802-zypp-count-patch-size.patch glin@novell.com -- calculate the download size of the patch
Patch6: PackageKit-BNC559802-zypp-count-patch-size.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: %{name}-branding
Requires: %{name}-lang = %{version}
PreReq: %fillup_prereq
%py_requires
%if %suse_version <= 1110
%define python_sitelib %{py_sitedir}
%endif
%description
PackageKit is a system designed to make installing and updating
software on your computer easier. The primary design goal is to unify
all the software graphical tools used in different distributions, and
use some of the latest technology like PolicyKit to make the process
suck less.
%package browser-plugin
License: GPLv2+
Summary: Simple software installation management software
Group: System/Daemons
Recommends: %{name} = %{version}
Supplements: packageand(%{name}:MozillaFirefox)
Supplements: packageand(%{name}:epiphany)
%description browser-plugin
PackageKit is a system designed to make installing and updating
software on your computer easier. The primary design goal is to unify
all the software graphical tools used in different distributions, and
use some of the latest technology like PolicyKit to make the process
suck less.
%package gstreamer-plugin
License: GPLv2+
Summary: Simple software installation management software
Group: System/Daemons
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: %{name} = %{version}
Supplements: packageand(%{name}:gstreamer-0_10-plugins-base)
%description gstreamer-plugin
PackageKit is a system designed to make installing and updating
software on your computer easier. The primary design goal is to unify
all the software graphical tools used in different distributions, and
use some of the latest technology like PolicyKit to make the process
suck less.
%package gtk-module
License: GPLv2+
Summary: Simple software installation management software
Group: System/Daemons
Recommends: %{name} = %{version}
Supplements: packageand(%{name}:gtk2)
%description gtk-module
PackageKit is a system designed to make installing and updating
software on your computer easier. The primary design goal is to unify
all the software graphical tools used in different distributions, and
use some of the latest technology like PolicyKit to make the process
suck less.
%package -n ruck
License: GPLv2+
Summary: PackageKit interface similar to rug
Requires: %{name} = %{version}
Group: System/Daemons
%description -n ruck
ruck is a rug-like interface for PackageKit ('rug' is the command-line
interface for rcd, red carpet daemon.)
%package devel
License: GPLv2+
Summary: Needed include files and libraries for development
Requires: %{name} = %{version}
Requires: glib2-devel libpackagekit-glib2-devel NetworkManager-devel sqlite3-devel
Group: System/Daemons
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description devel
This package contains all necessary include files, libraries,
configuration files and development tools (with manual pages) needed to
compile and link applications using PackageKit.
%package -n libpackagekit-glib2-14
License: GPLv2+
Summary: Simple software installation management software
Group: System/Daemons
Requires: %{name} = %{version}
%description -n libpackagekit-glib2-14
PackageKit is a system designed to make installing and updating
software on your computer easier. The primary design goal is to unify
all the software graphical tools used in different distributions, and
use some of the latest technology like PolicyKit to make the process
suck less.
%package -n libpackagekit-glib2-devel
License: GPLv2+
Summary: Simple software installation management software
Group: System/Daemons
Requires: %{name} = %{version}
Requires: libpackagekit-glib2-14 = %{version}
Requires: glib2-devel NetworkManager-devel sqlite3-devel
%description -n libpackagekit-glib2-devel
PackageKit is a system designed to make installing and updating
software on your computer easier. The primary design goal is to unify
all the software graphical tools used in different distributions, and
use some of the latest technology like PolicyKit to make the process
suck less.
%package -n libpackagekit-qt14
License: GPLv2+
Summary: Simple software installation management software
Group: System/Daemons
Requires: %{name} = %{version}
%description -n libpackagekit-qt14
PackageKit is a system designed to make installing and updating
software on your computer easier. The primary design goal is to unify
all the software graphical tools used in different distributions, and
use some of the latest technology like PolicyKit to make the process
suck less.
%package -n libpackagekit-qt-devel
License: GPLv2+
Summary: Simple software installation management software
Group: System/Daemons
Requires: %{name} = %{version}
Requires: libpackagekit-qt14 = %{version}
Requires: libqt4-devel
# Old name of the package; we can't provide it since the ABI has changed
Obsoletes: libpackagekit-qt12-devel <= 0.5.4
%description -n libpackagekit-qt-devel
PackageKit is a system designed to make installing and updating
software on your computer easier. The primary design goal is to unify
all the software graphical tools used in different distributions, and
use some of the latest technology like PolicyKit to make the process
suck less.
%package doc
License: GPLv2+
Summary: Simple software installation management software
Group: System/Daemons
Requires: %{name} = %{version}
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description doc
PackageKit is a system designed to make installing and updating
software on your computer easier. The primary design goal is to unify
all the software graphical tools used in different distributions, and
use some of the latest technology like PolicyKit to make the process
suck less.
%package branding-upstream
License: GPLv2+
Summary: Upstream branding of PackageKit
Group: System/Daemons
Supplements: packageand(%{name}:branding-upstream)
Provides: %{name}-branding = %{version}
Conflicts: otherproviders(%{name}-branding)
#BRAND: Provide configuration files -
#BRAND: /etc/PackageKit/*
%description branding-upstream
This package provides upstream Look and Feel for PackageKit.
%lang_package
%prep
%setup -q
%patch0 -p1
%patch2
%patch6 -p1
%build
%configure \
--disable-static \
--enable-zypp \
--with-default-backend=zypp \
--with-security-framework=polkit \
--with-mozilla-plugin-dir=%{_libdir}/browser-plugins \
%if ! %BUILD_CNF
--disable-command-not-found \
%endif
%{nil}
%__make %{?jobs: -j%jobs}
%install
%makeinstall
mv %{buildroot}%{_sysconfdir}/bash_completion.d/pk-completion.{ba,}sh
find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} +
# the pm-utils package in openSUSE uses libexecdir and not libdir
%if "%{_libdir}" != "%{_libexecdir}"
test ! -e %{buildroot}%{_libexecdir}/pm-utils
mv %{buildroot}%{_libdir}/pm-utils %{buildroot}%{_libexecdir}/pm-utils
%endif
# move the cron configuration to a sysconfig template
test -x %{buildroot}%{_sysconfdir}/sysconfig/packagekit-background
chmod a-x %{buildroot}%{_sysconfdir}/sysconfig/packagekit-background
install -d %{buildroot}%{_localstatedir}/adm/fillup-templates
mv %{buildroot}%{_sysconfdir}/sysconfig/packagekit-background %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.packagekit-background
%find_lang %{name}
%fdupes $RPM_BUILD_ROOT
%clean
rm -rf "$RPM_BUILD_ROOT"
%post
%{fillup_only -n packagekit-background}
%post gstreamer-plugin
update-alternatives --install %{_libexecdir}/gst-install-plugins-helper gst-install-plugins-helper %{_libexecdir}/pk-gstreamer-install 10
%postun gstreamer-plugin
# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed
if [ ! -f %{_libexecdir}/pk-gstreamer-install ]; then
update-alternatives --remove gst-install-plugins-helper %{_libexecdir}/pk-gstreamer-install
fi
%post -n libpackagekit-glib2-14 -p /sbin/ldconfig
%post -n libpackagekit-qt14 -p /sbin/ldconfig
%postun -n libpackagekit-glib2-14 -p /sbin/ldconfig
%postun -n libpackagekit-qt14 -p /sbin/ldconfig
%files lang -f %{name}.lang
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING HACKING NEWS README
%dir %{_sysconfdir}/PackageKit
%dir %{_datadir}/PackageKit
%dir %{_datadir}/PackageKit/helpers
%dir %{_datadir}/PackageKit/helpers/test_spawn
%dir %{_libdir}/packagekit-backend
%dir %{python_sitelib}/packagekit
%dir %{_libexecdir}/pm-utils
%dir %{_libexecdir}/pm-utils/sleep.d
%dir %{_localstatedir}/lib/PackageKit
%{_sysconfdir}/bash_completion.d/pk-completion.sh
%{_sysconfdir}/cron.daily/packagekit-background.cron
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.PackageKit.conf
%if %BUILD_CNF
%{_sysconfdir}/profile.d/PackageKit.sh
%endif
%{_localstatedir}/adm/fillup-templates/sysconfig.packagekit-background
%{_bindir}/packagekit-bugreport.sh
%{_bindir}/pk-debuginfo-install
%{_bindir}/pkcon
%{_bindir}/pkmon
%{_bindir}/pkgenpack
%{_libdir}/packagekit-backend/*.so
%{_libexecdir}/pm-utils/sleep.d/95packagekit
%if %BUILD_CNF
%{_libexecdir}/pk-command-not-found
%endif
%{_libdir}/polkit-1/extensions/libpackagekit-action-lookup.so
%{python_sitelib}/packagekit/*
%{_sbindir}/packagekitd
%{_sbindir}/pk-device-rebind
%{_datadir}/mime/packages/packagekit-*.xml
%{_datadir}/PackageKit/helpers/test_spawn/search-name.sh
%{_datadir}/PackageKit/pk-upgrade-distro.sh
%{_datadir}/polkit-1/actions/org.freedesktop.packagekit.policy
%{_datadir}/dbus-1/system-services/*
%doc %{_mandir}/man?/*.*
%verify(not md5 size mtime) %{_localstatedir}/lib/PackageKit/transactions.db
%files browser-plugin
%defattr(-,root,root)
%{_libdir}/browser-plugins/packagekit-plugin.so
%files gstreamer-plugin
%defattr(-,root,root)
%{_libexecdir}/pk-gstreamer-install
%files gtk-module
%defattr(-,root,root)
%{_libdir}/gtk-2.0/modules/*
%files doc
%defattr(-,root,root)
%{_datadir}/PackageKit/website
%files -n ruck
%defattr(-,root,root)
%{_bindir}/ruck
%{_datadir}/ruck
%files devel
%defattr(-,root,root)
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/PackageKit
%dir %{_includedir}/PackageKit
%dir %{_includedir}/PackageKit/backend
%{_includedir}/PackageKit/backend/pk*.h
%files -n libpackagekit-glib2-14
%defattr(-,root,root)
%{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
%{_libdir}/libpackagekit-glib2.so.*
%{_libdir}/girepository-1.0/PackageKitGlib-1.0.typelib
%files -n libpackagekit-glib2-devel
%defattr(-,root,root)
%{_libdir}/libpackagekit-glib2.so
%{_libdir}/pkgconfig/packagekit-glib2.pc
%dir %{_includedir}/PackageKit
%{_includedir}/PackageKit/packagekit-glib2/
%files -n libpackagekit-qt14
%defattr(-,root,root)
%{_libdir}/libpackagekit-qt.so.*
%files -n libpackagekit-qt-devel
%defattr(-,root,root)
%{_libdir}/libpackagekit-qt.so
%{_libdir}/pkgconfig/packagekit-qt.pc
%dir %{_includedir}/PackageKit
%dir %{_includedir}/PackageKit/packagekit-qt
%{_includedir}/PackageKit/packagekit-qt/*
%dir %{_datadir}/cmake
%{_datadir}/cmake/Modules/*
%files branding-upstream
%defattr(-,root,root)
%if %BUILD_CNF
%config(noreplace) %{_sysconfdir}/PackageKit/CommandNotFound.conf
%endif
%config(noreplace) %{_sysconfdir}/PackageKit/PackageKit.conf
# This file should not be touched by users/admins, so we can replace it
%{_sysconfdir}/PackageKit/Vendor.conf
%changelog