File gnome-packagekit.spec of Package gnome-packagekit.486

#
# spec file for package gnome-packagekit
#
# Copyright (c) 2015 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/
#


# We cannot enable systemd support right now, as it is exclusive and means we
# lose ConsoleKit support (bad for sysvinit)
%define with_systemd 1

Name:           gnome-packagekit
Version:        3.10.1
Release:        0
Summary:        Applications for the PackageKit API
License:        GPL-2.0+
Group:          System/GUI/GNOME
Url:            http://packagekit.org/
Source:         http://download.gnome.org/sources/gnome-packagekit/3.10/%{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE gnome-packagekit-displaysize.patch dimstar@opensuse.org -- Never expand over 90% of the screen size,
Patch0:         gnome-packagekit-displaysize.patch
# PATCH-FEATURE-OPENSUSE -- Only show gnome-packagekit in gnome.
Patch1:         gnome-packagekit-OnlyShowIn.patch
# PATCH-FIX-UPSTREAM gpk-expand-repos-and-softwarelog.patch zaitor@opensuse.org -- Properly expand repository list and software log, making them readable.
Patch2:         gpk-expand-repos-and-softwarelog.patch
# PATCH-FIx-UPSTREAM gnome-packagekit-fix-polkit-usage.patch bnc#881221 fcrozat@suse.com -- Properly call polkit and dbus for reboot
Patch3:         gnome-packagekit-fix-polkit-usage.patch
# PATCH-FIX-SLED bnc#881245-update-test-affects-package-manager-should-restart-gpk-update-viewer.patch rlmu@suse.com -- Restart gpk-update-viewer after certain update.
Patch4:         bnc#881245-update-test-affects-package-manager-should-restart-gpk-update-viewer.patch
# PATCH-FIX-UPSTREAM bnc#927319 license-agreement-title.patch fcrozat@suse.com -- Fix licence agreement title
Patch5:         license-agreement-title.patch
BuildRequires:  PackageKit-devel
BuildRequires:  desktop-file-utils
BuildRequires:  docbook-utils-minimal
BuildRequires:  gettext-devel
BuildRequires:  gnome-menus-devel
BuildRequires:  intltool
BuildRequires:  libcanberra-devel
BuildRequires:  libupower-glib-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  yelp-tools
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(gudev-1.0)
BuildRequires:  pkgconfig(libnotify)
%if %{with_systemd}
BuildRequires:  pkgconfig(libsystemd-login)
BuildRequires:  pkgconfig(polkit-gobject-1)
%endif
Requires:       gnome-icon-theme
Recommends:     %{name}-lang
Provides:       opensuse-updater-gnome = 0.4.7
Obsoletes:      opensuse-updater-gnome < 0.4.7
Provides:       org.freedesktop.PackageKit.service
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%py_requires
%glib2_gsettings_schema_requires

%description
GNOME PackageKit provides session applications for the PackageKit API.
There are several utilities designed for installing, updating and
removing packages on your system.

%package extras
Summary:        Applications for the PackageKit API - Extra applications
Group:          System/GUI/GNOME
Requires:       %{name} = %{version}

%description extras
GNOME PackageKit provides session applications for the PackageKit API.
There are several utilities designed for installing, updating and
removing packages on your system.

This package contains tools that provide functionality also provided by
YaST Software Management.

%lang_package
%prep
%setup -q
translation-update-upstream
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

%build
%configure \
%if %{with_systemd}
        --enable-systemd \
%endif
        %{nil}

make %{?_smp_mflags} V=1

%install
%make_install
%find_lang %{name} %{?no_lang_C}
%suse_update_desktop_file gpk-application
%suse_update_desktop_file gpk-dbus-service
# We do not ship distro-upgrade: the zypp backend does not support it.
find %{buildroot} -name 'gpk-distro-upgrade*' -delete -print
#suse_update_desktop_file gpk-distro-upgrade
%suse_update_desktop_file gpk-install-catalog
%suse_update_desktop_file gpk-install-local-file
%suse_update_desktop_file gpk-log Settings
%suse_update_desktop_file gpk-prefs X-GNOME-SystemSettings
%suse_update_desktop_file gpk-service-pack
%suse_update_desktop_file gpk-update-viewer
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/gpk-prefs.desktop

%clean
rm -rf %{buildroot}

%post
%desktop_database_post
%icon_theme_cache_post
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun

%post extras
%desktop_database_post

%postun extras
%desktop_database_postun

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%doc %{_datadir}/help/C/%{name}/
%{_bindir}/gpk-dbus-service
%{_bindir}/gpk-install-catalog
%{_bindir}/gpk-install-local-file
%{_bindir}/gpk-install-mime-type
%{_bindir}/gpk-install-package-name
%{_bindir}/gpk-install-provide-file
%{_bindir}/gpk-prefs
%{_bindir}/gpk-update-viewer
%dir %{_datadir}/GConf
%dir %{_datadir}/GConf/gsettings
%{_datadir}/GConf/gsettings/org.gnome.packagekit.gschema.migrate
%dir %{_datadir}/appdata
%{_datadir}/appdata/gpk-application.appdata.xml
%{_datadir}/appdata/gpk-update-viewer.appdata.xml
%{_datadir}/applications/gpk-dbus-service.desktop
%{_datadir}/applications/gpk-install-catalog.desktop
%{_datadir}/applications/gpk-install-local-file.desktop
%{_datadir}/applications/gpk-prefs.desktop
%{_datadir}/applications/gpk-update-viewer.desktop
%{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service
%{_datadir}/glib-2.0/schemas/org.gnome.packagekit.gschema.xml
%dir %{_datadir}/gnome-packagekit
%{_datadir}/gnome-packagekit/gpk-client.ui
%{_datadir}/gnome-packagekit/gpk-error.ui
%{_datadir}/gnome-packagekit/gpk-eula.ui
# gpk-log.ui is actually used by other apps
%{_datadir}/gnome-packagekit/gpk-log.ui
%{_datadir}/gnome-packagekit/gpk-prefs.ui
%{_datadir}/gnome-packagekit/gpk-signature.ui
%{_datadir}/gnome-packagekit/gpk-update-viewer.ui
%{_datadir}/gnome-packagekit/icons/
%{_datadir}/icons/hicolor/*/apps/gpk-*.*
%{_datadir}/icons/hicolor/*/mimetypes/application-*.*
%{python_sitelib}/packagekit/
%{_mandir}/man1/gpk-dbus-service.1%{?ext_man}
%{_mandir}/man1/gpk-install-catalog.1%{?ext_man}
%{_mandir}/man1/gpk-install-local-file.1%{?ext_man}
%{_mandir}/man1/gpk-install-mime-type.1%{?ext_man}
%{_mandir}/man1/gpk-install-package-name.1%{?ext_man}
%{_mandir}/man1/gpk-install-provide-file.1%{?ext_man}
%{_mandir}/man1/gpk-prefs.1%{?ext_man}
%{_mandir}/man1/gpk-update-viewer.1%{?ext_man}

%files lang -f %{name}.lang

%files extras
%defattr(-, root, root)
%{_bindir}/gpk-application
#{_bindir}/gpk-distro-upgrade
%{_bindir}/gpk-log
%{_bindir}/gpk-service-pack
%{_datadir}/applications/gpk-application.desktop
#{_datadir}/applications/gpk-distro-upgrade.desktop
%{_datadir}/applications/gpk-log.desktop
%{_datadir}/applications/gpk-service-pack.desktop
%{_datadir}/gnome-packagekit/gpk-application.ui
%{_datadir}/gnome-packagekit/gpk-service-pack.ui
%{_mandir}/man1/gpk-application.1%{?ext_man}
%{_mandir}/man1/gpk-log.1%{?ext_man}
%{_mandir}/man1/gpk-service-pack.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by