File python-virtkey.spec of Package python-virtkey

#
# spec file for package python-virtkey
#
# Copyright (c) 2013 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/
#


%define mod_name virtkey
%define build_for_python3 0

%if %{build_for_python3}
%define local_python      python3
%else
%define local_python      python
%endif

Name:           python-%{mod_name}
Version:        0.63.0
Release:        0
Url:            https://launchpad.net/virtkey
Summary:        Python extension to emulate keypresses
License:        LGPL-3.0+
Group:          Development/Languages/Python
Source:         %{mod_name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  glib2-devel
BuildRequires:  gtk2-devel
%if %{build_for_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-distribute
%else
BuildRequires:  python-devel
%endif
BuildRequires:  pkgconfig(gdk-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xkbfile)
BuildRequires:  pkgconfig(xtst)

%description
python-virtkey is a python extension for emulating keypresses and
getting the keyboard geometry from the xserver.

%prep
%setup -q -n %{mod_name}-%{version}

%build
export CFLAGS="%{optflags}"
%{local_python} setup.py build

%install
%{local_python} setup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES

%files -f INSTALLED_FILES
%defattr(-,root,root,-)
%doc AUTHORS COPYING.LESSER NEWS README

%changelog
openSUSE Build Service is sponsored by