File synaptiks.spec of Package synaptiks

#
# spec file for package synaptiks
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright 2009 Buschmann <buschmann23@opensuse.org>
#
# 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:           synaptiks
Version:        0.8.1
Release:        0
Summary:        A touchpad configuration and management tool for KDE
License:        BSD-2-Clause
Group:          Hardware/Other
Url:            http://synaptiks.readthedocs.org/
Source0:        http://pypi.python.org/packages/source/s/synaptiks/%{name}-%{version}.tar.bz2
# Patch sent upstream: https://github.com/lunaryorn/synaptiks/pull/67
Patch0:         czech.patch
# PATCH-FIX-OPENSUSE fix_help.diff Link (Christian Trippe, Link to the online help, bnc#800708)
Patch1:         fix_help.diff
# PATCH-FIX-UPSTREAM remove-several-features-that-will-no-longer-be-exposed.patch -- removes the features that got removed in synaptics >= 1.7
Patch2:         remove-several-features-that-will-no-longer-be-exposed.patch
BuildRequires:  fdupes
BuildRequires:  gettext
BuildRequires:  python-devel
BuildRequires:  python-distribute
BuildRequires:  python-kde4
BuildRequires:  python-pyudev
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
Requires:       kdebase4-workspace
Requires:       python-distribute
Requires:       python-kde4
Requires:       python-pyudev
%if 0%{?suse_version} > 1210
Requires:       xf86-input-synaptics
%else
Requires:       xorg-x11-driver-input
%endif
Recommends:     dbus-1-python
Recommends:     upower
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%kde4_runtime_requires
%py_requires

%description
synaptiks is a touchpad configuration and management tool for KDE. It provides
a System Settings module to configure both basic and more advanced settings of
the touchpad. Additionally it comes with a little system tray application,
which “manages” the touchpad. It does not only provide a global hotkey to
conveniently switch the touchpad on or off, it can also do this automatically
while you are typing, or if you plug in an external mouse.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES --single-version-externally-managed

%if 0%{?suse_version}
%suse_update_desktop_file -r synaptiks Qt KDE Settings HardwareSettings
%suse_update_desktop_file %{buildroot}%{_sysconfdir}/xdg/autostart/synaptiks_init_config.desktop
%endif

%kde_post_install
%fdupes -s %{buildroot}
%find_lang %{name}

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc CHANGES.rst COPYING README.rst
%{_sysconfdir}/xdg/autostart/synaptiks_init_config.desktop
%{_datadir}/autostart/synaptiks_autostart.desktop
%{_kde4_applicationsdir}/synaptiks.desktop
%{_kde4_appsdir}/synaptiks/
%{_kde4_bindir}/synaptiks
%{_kde4_bindir}/synaptikscfg
%{_kde4_iconsdir}/hicolor/scalable/apps/synaptiks.svgz
%{_kde4_servicesdir}/kcm_synaptiks.desktop
%{python_sitelib}/synaptiks-*
%{python_sitelib}/synaptiks/

%changelog
openSUSE Build Service is sponsored by