Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging: Support 0.4.x on both EPEL and Fedora #281

Merged
merged 1 commit into from
Aug 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ packages/RedHat

One common spec for all the RedHat flavours. To create RedHat
package for the current running distro, run `make rpm`.

NOTE: for python3 you should have python3-pkgversion-macros installed,
available both on Fedora and EPEL.
17 changes: 10 additions & 7 deletions packages/RedHat/python-pyroute2.spec
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
%global srcname pyroute2
%global sum Pure Python netlink library

%{!?python3_pkgversion:%global python3_pkgversion 3}

Name: python-%{srcname}
Version: 0.3.19
Version: 0.4.6
Release: 1%{?dist}
Summary: %{sum}
License: GPLv2+
Group: Development/Languages
URL: https://github.com/svinota/%{srcname}

BuildArch: noarch
BuildRequires: python2-devel python3-devel
Source: https://pypi.python.org/packages/source/p/pyroute2/pyroute2-%{version}.tar.gz
BuildRequires: python2-devel
BuildRequires: python%{python3_pkgversion}-devel
Source: https://pypi.io/packages/source/p/pyroute2/pyroute2-%{version}.tar.gz

%description
PyRoute2 provides several levels of API to work with Netlink
Expand All @@ -27,11 +30,11 @@ PyRoute2 provides several levels of API to work with Netlink
protocols, such as Generic Netlink, RTNL, TaskStats, NFNetlink,
IPQ.

%package -n python3-%{srcname}
%package -n python%{python3_pkgversion}-%{srcname}
Summary: %{sum}
%{?python_provide:%python_provide python3-%{srcname}}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}

%description -n python3-%{srcname}
%description -n python%{python3_pkgversion}-%{srcname}
PyRoute2 provides several levels of API to work with Netlink
protocols, such as Generic Netlink, RTNL, TaskStats, NFNetlink,
IPQ.
Expand All @@ -52,7 +55,7 @@ IPQ.
%doc README* LICENSE.GPL.v2 LICENSE.Apache.v2
%{python2_sitelib}/%{srcname}*

%files -n python3-%{srcname}
%files -n python%{python3_pkgversion}-%{srcname}
%doc README* LICENSE.GPL.v2 LICENSE.Apache.v2
%{python3_sitelib}/%{srcname}*

Expand Down