|
1 | | -%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} |
2 | | -%{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")} |
3 | | - |
4 | | -Summary: Ethernet settings python bindings |
5 | | -Name: python-ethtool |
6 | | -Version: 0.12 |
7 | | -Release: 1%{?dist} |
8 | | -URL: https://github.com/fedora-python/python-ethtool |
9 | | -Source: https://github.com/fedora-python/python-ethtool/archive/v%{version}.tar.gz |
10 | | -License: GPLv2 |
11 | | -Group: System Environment/Libraries |
12 | | -BuildRequires: python-devel libnl3-devel asciidoc |
13 | | -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
14 | | - |
15 | | -%description |
16 | | -Python bindings for the ethtool kernel interface, that allows querying and |
17 | | -changing of Ethernet card settings, such as speed, port, auto-negotiation, and |
18 | | -PCI locations. |
19 | | - |
20 | | -%prep |
21 | | -%setup -q |
22 | | - |
23 | | -%build |
24 | | -%{__python} setup.py build |
25 | | -a2x -d manpage -f manpage man/pethtool.8.asciidoc |
26 | | -a2x -d manpage -f manpage man/pifconfig.8.asciidoc |
27 | | - |
28 | | -%install |
29 | | -rm -rf %{buildroot} |
30 | | -%{__python} setup.py install --skip-build --root %{buildroot} |
31 | | -mkdir -p %{buildroot}%{_sbindir} %{buildroot}%{_mandir}/man8 |
32 | | -cp -p pethtool.py %{buildroot}%{_sbindir}/pethtool |
33 | | -cp -p pifconfig.py %{buildroot}%{_sbindir}/pifconfig |
34 | | -%{__gzip} -c man/pethtool.8 > %{buildroot}%{_mandir}/man8/pethtool.8.gz |
35 | | -%{__gzip} -c man/pifconfig.8 > %{buildroot}%{_mandir}/man8/pifconfig.8.gz |
36 | | - |
37 | | -%clean |
38 | | -rm -rf %{buildroot} |
39 | | - |
40 | | -%files |
41 | | -%defattr(-,root,root) |
42 | | -%doc COPYING |
43 | | -%{_sbindir}/pethtool |
44 | | -%{_sbindir}/pifconfig |
45 | | -%doc %{_mandir}/man8/* |
46 | | -%{python_sitearch}/ethtool.so |
47 | | -%if "%{python_ver}" >= "2.5" |
48 | | -%{python_sitearch}/*.egg-info |
49 | | -%endif |
50 | | - |
51 | | -%changelog |
52 | 1 | * Tue Mar 21 2017 Charalampos Stratakis <cstratak@redhat.com> - 0.12-1 |
53 | 2 | - Release 0.12 |
54 | 3 | - First attempt at python3 support |
|
0 commit comments