File apper.spec of Package apper
#
# spec file for package apper
#
# 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/
#
Name: apper
Summary: KDE interface for PackageKit
License: GPL-2.0+ and LGPL-3.0+
Group: System/Packages
Version: 0.9.2
Release: 0
Source0: http://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz
Source1: 10-opensuse-org.packagekit.updater.js
Patch0: apper-ui-fixes.diff
# PATCH-FIX-OPENSUSE https://bugzilla.novell.com/show_bug.cgi?id=729164
Patch1: apper-no-dbus-service.diff
# PATCH-FIX-OPENSUSE setting proxy requires polkit permissions - for very little gain
Patch2: apper-no-user-proxy.diff
# PATCH-FIX-OPENSUSE Avoid popup message boxes for locked or masked PK
Patch3: no-popup-for-background-actions.patch
Url: http://kde-apps.org/content/show.php/Apper?content=84745
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: PackageKit-Qt-devel >= 0.9.0
BuildRequires: kdebase4-workspace-devel
BuildRequires: libkde4-devel
BuildRequires: libxml2-tools
Recommends: %{name}-lang = %{version}
Provides: org.freedesktop.PackageKit.service
Requires: PackageKit >= 0.9.2
Obsoletes: apper-plasmoid < %{version}
Provides: apper-plasmoid = %{version}
%kde4_runtime_requires
%description
KDE interface for PackageKit package management.
%lang_package
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%cmake_kde4 -d build -- -DSCREENSHOT_PROVIDER=openSUSE
%make_jobs
%install
%kde4_makeinstall -C build
# avoid confusion with yast
%suse_update_desktop_file -C "Install, Update or Remove Software Packages" -N "Apper Software Management" %{buildroot}/%{_kde4_servicesdir}/kcm_apper.desktop
mkdir -p %{buildroot}%{_kde4_appsdir}/plasma-desktop/updates
install -m 0644 %{SOURCE1} %{buildroot}%{_kde4_appsdir}/plasma-desktop/updates/10-opensuse-org.packagekit.updater.js
# hack around gnome-packagekit conflict (bnc#846342)
mv %{buildroot}%{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service \
%{buildroot}%{_datadir}/dbus-1/services/kde-org.freedesktop.PackageKit.service
%kde_post_install
mkdir -p %{buildroot}%{_datadir}/help
%find_lang %{name} %{name}.lang
%find_lang plasma_applet_org.packagekit.updater %{name}.lang
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
cat <<EOF >%{buildroot}%{_sysconfdir}/ld.so.conf.d/apper.conf
%{_kde4_libdir}/apper
EOF
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc COPYING TODO
%{_kde4_libexecdir}/apper-pk-session
%{_kde4_appsdir}/apperd/
%{_kde4_appsdir}/apper/
%{_kde4_bindir}/apper
%dir %{_kde4_libdir}/apper
%{_kde4_applicationsdir}/apper*.desktop
%{_kde4_servicesdir}/kcm_apper.desktop
%{_kde4_servicesdir}/kded/apperd.desktop
%{_kde4_datadir}/dbus-1/services/kde-org.freedesktop.PackageKit.service
%{_kde4_appsdir}/plasma/
%{_kde4_servicesdir}/plasma-applet-org.packagekit.updater.desktop
%{_kde4_appsdir}/plasma-desktop/updates/10-opensuse-org.packagekit.updater.js
%doc %{_kde4_mandir}/man1/*
%{_kde4_libdir}/%{name}/libapper.so
%{_kde4_modulesdir}/*.so
%config %{_kde4_sysconfdir}/ld.so.conf.d/apper.conf
%{_kde4_modulesdir}/imports/org/kde/%{name}/
%dir %{_kde4_datadir}/appdata
%{_kde4_datadir}/appdata/apper.appdata.xml
%files lang -f %{name}.lang
%defattr(-,root,root)
%changelog