3 %bcond_without python2 # CPython 2.x module
4 %bcond_with python3 # CPython 3.x module (enable when useful - now scripts use python2 shebang)
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: b505501d928debf69664b72fafa9d0c3
15 URL: https://fedorahosted.org/python-ethtool/
16 BuildRequires: asciidoc
17 BuildRequires: libnl-devel >= 3.2
18 BuildRequires: python-devel >= 2
19 BuildRequires: python-modules >= 2
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.612
23 BuildRequires: python3-devel >= 1:3.2
24 BuildRequires: python3-modules >= 1:3.2
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Python 2 bindings for the ethtool kernel interface, that allows
30 querying and changing of Ethernet card settings, such as speed, port,
31 auto-negotiation, and PCI locations.
33 %description -l pl.UTF-8
34 Wiązania Pythona 2 do interfejsu ethtool w jądrze, pozwalającego na
35 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
36 port, autonegocjacja oraz lokalizacja PCI.
38 %package -n python3-ethtool
39 Summary: Python 3 bindings to Ethernet settings
40 Summary(pl.UTF-8): Wiązania Pythona 3 do ustawień sieci Ethernet
41 Group: Libraries/Python
43 %description -n python3-ethtool
44 Python 3 bindings for the ethtool kernel interface, that allows
45 querying and changing of Ethernet card settings, such as speed, port,
46 auto-negotiation, and PCI locations.
48 %description -n python3-ethtool -l pl.UTF-8
49 Wiązania Pythona 3 do interfejsu ethtool w jądrze, pozwalającego na
50 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
51 port, autonegocjacja oraz lokalizacja PCI.
65 a2x -d manpage -f manpage man/pethtool.8.asciidoc
66 a2x -d manpage -f manpage man/pifconfig.8.asciidoc
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT%{_sbindir}
75 cp -p pethtool.py $RPM_BUILD_ROOT%{_sbindir}/pethtool
76 cp -p pifconfig.py $RPM_BUILD_ROOT%{_sbindir}/pifconfig
84 rm -rf $RPM_BUILD_ROOT
88 %defattr(644,root,root,755)
89 %attr(755,root,root) %{_sbindir}/pethtool
90 %attr(755,root,root) %{_sbindir}/pifconfig
91 %attr(755,root,root) %{py_sitedir}/ethtool.so
92 %if "%{py_ver}" > "2.4"
93 %{py_sitedir}/ethtool-%{version}-py*.egg-info
98 %files -n python3-ethtool
99 %defattr(644,root,root,755)
100 %attr(755,root,root) %{py3_sitedir}/ethtool.cpython-*.so
101 %{py3_sitedir}/ethtool-%{version}-py*.egg-info