Skip to content

Commit

Permalink
Merge pull request #281 from celebdor/packaging
Browse files Browse the repository at this point in the history
packaging: Support 0.4.x on both EPEL and Fedora
  • Loading branch information
svinota committed Aug 30, 2016
2 parents eb726bf + 2f97288 commit f5218a1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
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

0 comments on commit f5218a1

Please sign in to comment.