Dominique Leuenberger
15c914c359
Update to 1.1.8 OBS-URL: https://build.opensuse.org/request/show/578903 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/PackageKit?expand=0&rev=310
435 lines
15 KiB
RPMSpec
435 lines
15 KiB
RPMSpec
#
|
|
# spec file for package PackageKit
|
|
#
|
|
# Copyright (c) 2018 SUSE LINUX 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/
|
|
#
|
|
|
|
|
|
# $ pkcon search file /usr/bin/anjuta
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
%if ! %{defined _fillupdir}
|
|
%define _fillupdir /var/adm/fillup-templates
|
|
%endif
|
|
|
|
%define BUILD_CNF 0
|
|
%define with_offline_updates 1
|
|
Name: PackageKit
|
|
Version: 1.1.8
|
|
Release: 0
|
|
Summary: Simple software installation management software
|
|
License: GPL-2.0+
|
|
Group: System/Daemons
|
|
Url: http://packagekit.org/
|
|
Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
|
|
Source1: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz.asc
|
|
Source2: baselibs.conf
|
|
Source99: PackageKit.keyring
|
|
# PATCH-FIX-UPSTREAM PackageKit-avoid-endless-loop-on-autoupdate.patch zaitor@opensuse.org -- Avoid a endless loop on autoupdates.
|
|
Patch0: PackageKit-avoid-endless-loop-on-autoupdate.patch
|
|
# PATCH-FIX-OPENSUSE PackageKit-zypp-backend-improve-refresh-cache.patch bsc#899755 sckang@suse.com -- Improve refresh-cache function in zypp backend.
|
|
Patch1: PackageKit-zypp-backend-improve-refresh-cache.patch
|
|
# PATCH-FIX-OPENSUSE PackageKit-cron-without-sleep.patch boo#1071521 dimstar@opensuse.org -- Do not sleep in the cron job; our cron mechansim has sufficient randomization
|
|
Patch2: PackageKit-cron-without-sleep.patch
|
|
BuildRequires: NetworkManager-devel
|
|
BuildRequires: fdupes
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: gobject-introspection-devel
|
|
BuildRequires: gstreamer-devel
|
|
BuildRequires: gstreamer-plugins-base-devel
|
|
BuildRequires: gtk-doc
|
|
BuildRequires: gtk2-devel
|
|
BuildRequires: gtk3-devel
|
|
BuildRequires: intltool
|
|
BuildRequires: libarchive-devel
|
|
BuildRequires: libcppunit-devel
|
|
BuildRequires: libgudev-1_0-devel
|
|
BuildRequires: libtool
|
|
BuildRequires: libzypp-devel
|
|
BuildRequires: mozilla-nspr-devel >= 4.8
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: polkit-devel >= 0.98
|
|
# We need the %%mime_database_* macros
|
|
BuildRequires: shared-mime-info
|
|
BuildRequires: sqlite-devel
|
|
BuildRequires: vala
|
|
BuildRequires: pkgconfig(bash-completion) >= 2.0
|
|
BuildRequires: pkgconfig(libsystemd)
|
|
BuildRequires: pkgconfig(npapi-sdk)
|
|
BuildRequires: pkgconfig(systemd)
|
|
# We really want a working backend (likely zypp)
|
|
Requires: %{name}-backend
|
|
Requires: %{name}-branding = %{version}
|
|
Requires(post): %fillup_prereq
|
|
Recommends: %{name}-lang
|
|
Suggests: cron
|
|
# doc package only contained the website, and got removed in 0.7.4
|
|
Obsoletes: %{name}-doc < 0.7.4
|
|
# gtk+ 2 module was removed in 0.7.0
|
|
Obsoletes: %{name}-gtk-module < 0.7.0
|
|
# ruck was removed in 0.6.4, make sure it gets removed
|
|
Obsoletes: ruck <= 0.6.3
|
|
# the browser-plugin was dropped with version 1.1.0
|
|
Obsoletes: %{name}-browser-plugin < 1.1.0
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%{?systemd_requires}
|
|
%if !0%{?is_opensuse}
|
|
BuildRequires: translation-update-upstream
|
|
%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 backend-zypp
|
|
Summary: Simple software installation management software -- Zypp Backend
|
|
License: GPL-2.0+
|
|
Group: System/Daemons
|
|
Requires: %{name} = %{version}
|
|
Provides: %{name}-backend = %{version}
|
|
|
|
%description backend-zypp
|
|
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
|
|
Summary: Simple software installation management software
|
|
License: GPL-2.0+
|
|
Group: Productivity/Multimedia/Other
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
Recommends: %{name} = %{version}
|
|
Supplements: packageand(%{name}:gstreamer-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 gtk3-module
|
|
Summary: Simple software installation management software
|
|
License: GPL-2.0+
|
|
Group: System/Libraries
|
|
Recommends: %{name} = %{version}
|
|
Supplements: packageand(%{name}:gtk3)
|
|
%glib2_gsettings_schema_requires
|
|
|
|
%description gtk3-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 devel
|
|
Summary: Needed include files and libraries for development
|
|
License: GPL-2.0+
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{name} = %{version}
|
|
Requires: libpackagekit-glib2-devel
|
|
|
|
%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-18
|
|
Summary: Simple software installation management software
|
|
License: LGPL-2.1+
|
|
Group: System/Libraries
|
|
Recommends: %{name}
|
|
Conflicts: %{name} < %{version}
|
|
Provides: libpackagekit-glib12 = %{version}
|
|
Obsoletes: libpackagekit-glib12 < %{version}
|
|
|
|
%description -n libpackagekit-glib2-18
|
|
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 typelib-1_0-PackageKitGlib-1_0
|
|
Summary: Simple software installation management software -- Introspection bindings
|
|
License: LGPL-2.1+
|
|
Group: System/Libraries
|
|
|
|
%description -n typelib-1_0-PackageKitGlib-1_0
|
|
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.
|
|
|
|
This package provides the GObject Introspection bindings for the
|
|
PackageKit client library.
|
|
|
|
%package -n libpackagekit-glib2-devel
|
|
Summary: Simple software installation management software
|
|
License: LGPL-2.1+
|
|
Group: Development/Libraries/GNOME
|
|
Requires: libpackagekit-glib2-18 = %{version}
|
|
Requires: typelib-1_0-PackageKitGlib-1_0 = %{version}
|
|
Provides: libpackagekit-glib12-devel = %{version}
|
|
Obsoletes: libpackagekit-glib12-devel < %{version}
|
|
|
|
%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 branding-upstream
|
|
Summary: Simple software installation management software -- Upstream configuration
|
|
License: GPL-2.0+
|
|
Group: System/Daemons
|
|
Requires: %{name} = %{version}
|
|
Supplements: packageand(%{name}:branding-upstream)
|
|
Conflicts: otherproviders(%{name}-branding)
|
|
Provides: %{name}-branding = %{version}
|
|
BuildArch: noarch
|
|
#BRAND: Provide configuration files -
|
|
#BRAND: /etc/PackageKit/*
|
|
|
|
%description branding-upstream
|
|
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.
|
|
|
|
This package provides the upstream default configuration for PackageKit.
|
|
|
|
%lang_package
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%if !0%{?is_opensuse}
|
|
translation-update-upstream
|
|
%endif
|
|
|
|
%build
|
|
%if !0%{?is_opensuse}
|
|
export CFLAGS="%{optflags} -DSLE"
|
|
%endif
|
|
%configure \
|
|
--disable-static \
|
|
--enable-zypp \
|
|
--enable-gstreamer-plugin \
|
|
%if ! %{BUILD_CNF}
|
|
--disable-command-not-found \
|
|
%else
|
|
--enable-command-not-found \
|
|
%endif
|
|
--enable-systemd \
|
|
%if %{with_offline_updates}
|
|
--enable-offline-update \
|
|
%else
|
|
--disable-offline-update \
|
|
%endif
|
|
%{nil}
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
# move the cron configuration to a sysconfig template
|
|
install -d %{buildroot}%{_fillupdir}
|
|
mv %{buildroot}%{_sysconfdir}/sysconfig/packagekit-background %{buildroot}%{_fillupdir}/sysconfig.packagekit-background
|
|
# Prepare for update-alternatives
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
ln -s -f %{_sysconfdir}/alternatives/gst-install-plugins-helper %{buildroot}/%{_libexecdir}/gst-install-plugins-helper
|
|
# Add rcFOO symlinks
|
|
mkdir -p %{buildroot}%{_sbindir}
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcpackagekit
|
|
%if %{with_offline_updates}
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcpackagekit-offline-update
|
|
%endif
|
|
|
|
%find_lang %{name} %{?no_lang_C}
|
|
%fdupes %{buildroot}
|
|
|
|
%pre
|
|
%service_add_pre packagekit.service
|
|
%if %{with_offline_updates}
|
|
%service_add_pre packagekit-offline-update.service
|
|
%endif
|
|
|
|
%post
|
|
%{fillup_only -n packagekit-background}
|
|
%mime_database_post
|
|
%service_add_post packagekit.service
|
|
%if %{with_offline_updates}
|
|
%service_add_post packagekit-offline-update.service
|
|
%else
|
|
if [ -L system-update ]; then
|
|
rm system-update
|
|
fi
|
|
if [ -f var/lib/PackageKit/prepared-update ]; then
|
|
rm var/lib/PackageKit/prepared-update
|
|
fi
|
|
%endif
|
|
|
|
%preun
|
|
%service_del_preun packagekit.service
|
|
%if %{with_offline_updates}
|
|
%service_del_preun packagekit-offline-update.service
|
|
%endif
|
|
|
|
%postun
|
|
%mime_database_postun
|
|
# Do not restart PackageKit on upgrade - it kills the transaction
|
|
export DISABLE_RESTART_ON_UPDATE=yes
|
|
%service_del_postun packagekit.service
|
|
%if %{with_offline_updates}
|
|
%service_del_postun packagekit-offline-update.service
|
|
%endif
|
|
|
|
%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
|
|
|
|
%if 0%{?suse_version} < 1330
|
|
%post gtk3-module
|
|
%glib2_gsettings_schema_post
|
|
|
|
%postun gtk3-module
|
|
%glib2_gsettings_schema_postun
|
|
%endif
|
|
|
|
%post -n libpackagekit-glib2-18 -p /sbin/ldconfig
|
|
|
|
%postun -n libpackagekit-glib2-18 -p /sbin/ldconfig
|
|
|
|
%files lang -f %{name}.lang
|
|
%defattr(-,root,root)
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc AUTHORS 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 %{_localstatedir}/lib/PackageKit
|
|
%{_datadir}/bash-completion/completions/pkcon
|
|
%{_sysconfdir}/cron.daily/packagekit-background.cron
|
|
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.PackageKit.conf
|
|
%if %{BUILD_CNF}
|
|
%{_sysconfdir}/profile.d/PackageKit.sh
|
|
%endif
|
|
%{_fillupdir}/sysconfig.packagekit-background
|
|
%{_bindir}/pkcon
|
|
%{_bindir}/pkmon
|
|
%{_libdir}/packagekit-backend/libpk_backend_dummy.so
|
|
%{_libexecdir}/packagekitd
|
|
%{_libexecdir}/packagekit-direct
|
|
%if %{BUILD_CNF}
|
|
%{_libexecdir}/pk-command-not-found
|
|
%endif
|
|
%{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.Transaction.xml
|
|
%{_datadir}/dbus-1/interfaces/org.freedesktop.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}/polkit-1/rules.d/org.freedesktop.packagekit.rules
|
|
%{_datadir}/dbus-1/system-services/*
|
|
%dir %{_localstatedir}/cache/%{name}
|
|
%{_unitdir}/packagekit.service
|
|
%{_sbindir}/rcpackagekit
|
|
%{_mandir}/man?/*.*
|
|
%verify(not md5 size mtime) %{_localstatedir}/lib/PackageKit/transactions.db
|
|
%if %{with_offline_updates}
|
|
%{_libexecdir}/pk-offline-update
|
|
%{_unitdir}/packagekit-offline-update.service
|
|
%dir %{_unitdir}/system-update.target.wants
|
|
%{_unitdir}/system-update.target.wants/packagekit-offline-update.service
|
|
%{_sbindir}/rcpackagekit-offline-update
|
|
%endif
|
|
|
|
%files backend-zypp
|
|
%defattr(-,root,root)
|
|
%{_libdir}/packagekit-backend/libpk_backend_zypp.so
|
|
|
|
%files gstreamer-plugin
|
|
%defattr(-,root,root)
|
|
%ghost %{_sysconfdir}/alternatives/gst-install-plugins-helper
|
|
%{_libexecdir}/gst-install-plugins-helper
|
|
%{_libexecdir}/pk-gstreamer-install
|
|
|
|
%files gtk3-module
|
|
%defattr(-,root,root)
|
|
%dir %{_libdir}/gnome-settings-daemon-3.0
|
|
%dir %{_libdir}/gnome-settings-daemon-3.0/gtk-modules
|
|
%{_libdir}/gnome-settings-daemon-3.0/gtk-modules/pk-gtk-module.desktop
|
|
%{_libdir}/gtk-3.0/modules/*
|
|
%{_libdir}/gtk-2.0/modules/*
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%doc %{_datadir}/gtk-doc/html/PackageKit
|
|
%{_datadir}/vala/vapi/packagekit-glib2.vapi
|
|
# Test backends are not useful, except for developers
|
|
%{_libdir}/packagekit-backend/libpk_backend_test_fail.so
|
|
%{_libdir}/packagekit-backend/libpk_backend_test_nop.so
|
|
%{_libdir}/packagekit-backend/libpk_backend_test_spawn.so
|
|
%{_libdir}/packagekit-backend/libpk_backend_test_succeed.so
|
|
%{_libdir}/packagekit-backend/libpk_backend_test_thread.so
|
|
%dir %{_includedir}/PackageKit
|
|
|
|
%files -n libpackagekit-glib2-18
|
|
%defattr(-,root,root)
|
|
%doc lib/packagekit-glib2/COPYING
|
|
%{_libdir}/libpackagekit-glib2.so.*
|
|
|
|
%files -n typelib-1_0-PackageKitGlib-1_0
|
|
%defattr(-,root,root)
|
|
%{_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/
|
|
%{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
|
|
|
|
%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
|