3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 Summary: Python 2 bindings to Ethernet settings
7 Summary(pl.UTF-8): Wiązania Pythona 2 do ustawień sieci Ethernet
12 Group: Libraries/Python
13 Source0: https://fedorahosted.org/releases/p/y/python-ethtool/%{name}-%{version}.tar.bz2
14 # Source0-md5: 8089d72c9dbe0570bc2aa6ecd59e026f
15 Patch0: %{name}-build.patch
16 URL: https://fedorahosted.org/python-ethtool/
17 BuildRequires: asciidoc
18 BuildRequires: libnl-devel >= 3.2
19 BuildRequires: python-devel >= 2
20 BuildRequires: python-modules >= 2
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.710
24 BuildRequires: python3-devel >= 1:3.2
25 BuildRequires: python3-modules >= 1:3.2
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Python 2 bindings for the ethtool kernel interface, that allows
31 querying and changing of Ethernet card settings, such as speed, port,
32 auto-negotiation, and PCI locations.
34 %description -l pl.UTF-8
35 Wiązania Pythona 2 do interfejsu ethtool w jądrze, pozwalającego na
36 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
37 port, autonegocjacja oraz lokalizacja PCI.
39 %package -n python3-ethtool
40 Summary: Python 3 bindings to Ethernet settings
41 Summary(pl.UTF-8): Wiązania Pythona 3 do ustawień sieci Ethernet
42 Group: Libraries/Python
44 %description -n python3-ethtool
45 Python 3 bindings for the ethtool kernel interface, that allows
46 querying and changing of Ethernet card settings, such as speed, port,
47 auto-negotiation, and PCI locations.
49 %description -n python3-ethtool -l pl.UTF-8
50 Wiązania Pythona 3 do interfejsu ethtool w jądrze, pozwalającego na
51 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
52 port, autonegocjacja oraz lokalizacja PCI.
67 a2x -d manpage -f manpage man/pethtool.8.asciidoc
68 a2x -d manpage -f manpage man/pifconfig.8.asciidoc
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT%{_sbindir}
77 cp -p pethtool.py $RPM_BUILD_ROOT%{_sbindir}/pethtool
78 cp -p pifconfig.py $RPM_BUILD_ROOT%{_sbindir}/pifconfig
86 rm -rf $RPM_BUILD_ROOT
90 %defattr(644,root,root,755)
91 %attr(755,root,root) %{_sbindir}/pethtool
92 %attr(755,root,root) %{_sbindir}/pifconfig
93 %attr(755,root,root) %{py_sitedir}/ethtool.so
94 %if "%{py_ver}" > "2.4"
95 %{py_sitedir}/ethtool-%{version}-py*.egg-info
100 %files -n python3-ethtool
101 %defattr(644,root,root,755)
102 %attr(755,root,root) %{py3_sitedir}/ethtool.cpython-*.so
103 %{py3_sitedir}/ethtool-%{version}-py*.egg-info