File apper.spec of Package apper
#
# spec file for package apper
#
# Copyright (c) 2012 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/
#
Summary: KDE interface for PackageKit
License: GPL-2.0+
Group: System/Packages
Name: apper
Version: 0.7.2
Release: 0
%define _base_version 0.7
Source0: https://launchpad.net/apper/%{_base_version}/%{version}/+download/%{name}-%{version}.tar.bz2
Patch0: revert-upstream.diff
Patch2: apper-ui-fixes.diff
Patch4: apper-no-dbus-service.diff
Patch5: apper-no-user-proxy.diff
Patch6: rename_apper_kcm.diff
Url: http://kde-apps.org/content/show.php/Apper?content=84745
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: kdebase4-workspace-devel
BuildRequires: libpackagekit-qt2-devel
Requires: PackageKit
%if 0%{?suse_version} > 1210
Requires: yast2-packager
%endif
Recommends: %{name}-lang = %{version}
# last used in 11.4
Obsoletes: kpackagekit <= 0.6.3.3
Provides: kpackagekit = 0.7
# last used in 11.3
Provides: kupdateapplet = 0.9.18
Obsoletes: kupdateapplet <= 0.9.17
%kde4_runtime_requires
%description
KDE interface for PackageKit package management.
%lang_package
%prep
%setup -q -n %{name}-%{version}
# For now revert this specific commit to make libapper.so in a private library. INSTALL_RPATH seems not to function
%patch0 -p1
#%patch2 -p1
%patch4 -p1
%patch5 -p1
%patch6
%build
%if 0%{?suse_version} <= 1210
%cmake_kde4 -d build -- -DEDIT_ORIGNS_DESKTOP_NAME="yast inst_source"
%else
%cmake_kde4 -d build -- -DEDIT_ORIGNS_DESKTOP_NAME="sw_source"
%endif
%make_jobs
%install
cd build
%makeinstall
cd ..
%suse_update_desktop_file apper
#This is needed to allow translations of the changed name in the KCM
%suse_update_desktop_file %{buildroot}/usr/share/kde4/services/kcm_apper.desktop
%kde_post_install
%find_lang %{name}
%files
%defattr(-,root,root)
%_kde4_modulesdir/*.so
%_kde4_modulesdir/libexec/apper-sentinel
%_kde4_appsdir/apper/
%_kde4_appsdir/ApperSentinel/
%_kde4_bindir/apper
%_kde4_libdir/libapper.so
%_kde4_applicationsdir/apper.desktop
%_kde4_servicesdir/kcm_apper.desktop
%_kde4_servicesdir/kded/apperd.desktop
%_kde4_applicationsdir/apper_installer.desktop
%_kde4_applicationsdir/apper_settings.desktop
%_kde4_applicationsdir/apper_updates.desktop
%{_datadir}/man/man1/apper.1.gz
%{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service
%{_datadir}/dbus-1/services/org.kde.ApperSentinel.service
%files lang -f %{name}.lang
%changelog