$ git diff --patch-with-stat --summary 93105ffa386d964fcf7c87c88975cc227944a8d6..2586a75c36080803d4d1fe487bbf885f95003d99
.abf.yml | 2 +-
fix-provides.patch | 26 +++++++++++++++++++
python-pyroute2.spec | 71 +++++++++++++++++++++++++++++++---------------------
3 files changed, 70 insertions(+), 29 deletions(-)
create mode 100644 fix-provides.patch
diff --git a/.abf.yml b/.abf.yml
index 67e884f..c839753 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- 0.5.7.tar.gz: 79f7b5de0a6f30250b3a6fe8dc246f614848a5c6
+ 0.5.14.tar.gz: 478ee7a00250fad32ad6ddfbfa46abbc38cd9ee3
diff --git a/fix-provides.patch b/fix-provides.patch
new file mode 100644
index 0000000..fdc3789
--- /dev/null
+++ b/fix-provides.patch
@@ -0,0 +1,26 @@
+diff --git a/Makefile b/Makefile
+index df926f2..ffd26c3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,7 +8,7 @@
+ # Pyroute version and release
+ #
+ version ?= 0.5
+-release := $(shell git describe | sed 's/-[^-]*$$//;s/-/.post/')
++release := 0.5.14
+ ##
+ # Python-related configuration
+ #
+diff --git a/setup.py b/setup.py
+index 5c387f0..b0f1449 100644
+--- a/setup.py
++++ b/setup.py
+@@ -23,7 +23,7 @@ module = __import__(config.get('setup', 'setuplib'),
+ ['setup'], 0)
+ setup = getattr(module, 'setup')
+
+-readme = open("README.md", "r")
++readme = open("README.rst", "r")
+
+
+ setup(name='pyroute2',
diff --git a/python-pyroute2.spec b/python-pyroute2.spec
index ac57d16..6409ad8 100644
--- a/python-pyroute2.spec
+++ b/python-pyroute2.spec
@@ -1,35 +1,50 @@
-%define module pyroute2
-
-Summary: Python netlink library — Linux network setup and monitoring
-Name: python-pyroute2
-Version: 0.5.7
-Release: 1
-Group: Development/Python
-License: Python
-Url: https://pypi.python.org/pypi/pyroute2
-Source0: https://github.com/svinota/pyroute2/archive/%{version}.tar.gz
-BuildArch: noarch
-BuildRequires: python-setuptools
-BuildRequires: pkgconfig(python3)
-
-%description
-Pyroute2 is a pure Python netlink library. It requires only Python stdlib,
-no 3rd party libraries. The library was started as an RTNL protocol
-implementation, so the name is pyroute2, but now it supports many netlink
-protocols.
+# Created by pyp2rpm-3.3.5
+%global pypi_name pyroute2
+%define debug_package %{nil}
+
+Name: python-%{pypi_name}
+Version: 0.5.14
+Release: 2
+Summary: Python Netlink library
+Group: Development/Python
+License: dual license GPLv2+ and Apache v2
+URL: https://github.com/svinota/pyroute2
+Source0: %{version}.tar.gz
+Patch0: fix-provides.patch
+BuildRequires: python3-devel
+BuildRequires: (python3dist(psutil) >= 5 with python3dist(psutil) < 6)
+BuildRequires: python3dist(setuptools)
+#BuildRequires: python3dist(win-inet-pton)
+
+%description
+Pyroute2 is a pure Python **netlink** library. The core requires only Python
+stdlib, no 3rd party libraries. The library was started as an RTNL protocol
+implementation, so the name is **pyroute2**, but now it supports many netlink
+protocols. Some supported netlink families and protocols:* **rtnl**, network
+settings addresses, routes, traffic controls * **nfnetlink** netfilter API *
+**ipq**...
%prep
-%setup -qn %{module}-%{version}
-%apply_patches
+%setup -n %{pypi_name}-%{version}
+#mv README.rst README.md
+# Remove bundled egg-info
+rm -rf %{pypi_name}.egg-info
+%autopatch
+
%build
-%__python setup.py build
-
-%install
-%__python setup.py install --root=%{buildroot}
+%py3_build
+
+%install
+%py3_install
+
+#%%check
+#%%{__python3} setup.py test
-%files
+%files -n python-%{pypi_name}
+%license README.license.md LICENSE.Apache.v2 LICENSE.GPL.v2
+%doc README.make.md README.md README.report.md README.rst examples/README.md
%{_bindir}/pyroute2-cli
%{_bindir}/ss2
-%{py_sitedir}/pyroute2*.egg-info
-%{py_sitedir}/pyroute2
+%{python3_sitelib}/%{pypi_name}
+%{python3_sitelib}/pyroute2-0.5.14-py%{python3_version}.egg-info