File python-kmod.spec of Package python-kmod

#
# spec file for package python-kmod
#
# Copyright (c) 2016 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:           python-kmod
Version:        0.9.1
Release:        0
Summary:        Python module to work with kernel modules
License:        LGPL-2.1+
Group:          Development/Languages/Python
Url:            https://github.com/agrover/python-kmod
Source:         https://pypi.python.org/packages/source/k/kmod/kmod-%{version}.tar.gz
# PATCH-FIX-OPENSUSE fix-build.patch
%if 0%{?suse_version} > 1320
Patch0:         fix-build.patch
%else
Patch0:         fix-build-kmod-17.patch
%endif
BuildRequires:  kmod
BuildRequires:  libkmod-devel
BuildRequires:  python
BuildRequires:  python-devel
BuildRequires:  python-Cython
BuildRequires:  python-setuptools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Python bindings for kmod/libkmod

kmod is a set of tools to handle common tasks with Linux kernel modules like
insert, remove, list, check properties, resolve dependencies and aliases.

These tools are designed on top of libkmod, a library that is shipped with
kmod. It can be found at:

http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary

python-kmod is a Python wrapper module for libkmod, exposing common module
operations: listing installed modules, modprobe, and rmmod.

%prep
%setup -q -n kmod-%{version}
%patch0 -p1

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%files
%defattr(-,root,root)
%dir %{python_sitearch}/kmod/
%{python_sitearch}/kmod/*
%{python_sitearch}/kmod*.egg-info
%doc COPYING.LESSER README

%changelog
openSUSE Build Service is sponsored by