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: pkgconfig
21 BuildRequires: python-devel >= 2
22 BuildRequires: python-modules >= 2
25 BuildRequires: python3-devel >= 1:3.2
26 BuildRequires: python3-modules >= 1:3.2
28 BuildRequires: rpm-pythonprov
29 BuildRequires: rpmbuild(macros) >= 1.714
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Python 2 bindings for the ethtool kernel interface, that allows
34 querying and changing of Ethernet card settings, such as speed, port,
35 auto-negotiation, and PCI locations.
37 %description -l pl.UTF-8
38 Wiązania Pythona 2 do interfejsu ethtool w jądrze, pozwalającego na
39 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
40 port, autonegocjacja oraz lokalizacja PCI.
42 %package -n python3-ethtool
43 Summary: Python 3 bindings to Ethernet settings
44 Summary(pl.UTF-8): Wiązania Pythona 3 do ustawień sieci Ethernet
45 Group: Libraries/Python
47 %description -n python3-ethtool
48 Python 3 bindings for the ethtool kernel interface, that allows
49 querying and changing of Ethernet card settings, such as speed, port,
50 auto-negotiation, and PCI locations.
52 %description -n python3-ethtool -l pl.UTF-8
53 Wiązania Pythona 3 do interfejsu ethtool w jądrze, pozwalającego na
54 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
55 port, autonegocjacja oraz lokalizacja PCI.
70 a2x -d manpage -f manpage man/pethtool.8.asciidoc
71 a2x -d manpage -f manpage man/pifconfig.8.asciidoc
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8}
80 cp -p pethtool.py $RPM_BUILD_ROOT%{_sbindir}/pethtool
81 cp -p pifconfig.py $RPM_BUILD_ROOT%{_sbindir}/pifconfig
82 cp -p man/{pethtool,pifconfig}.8 $RPM_BUILD_ROOT%{_mandir}/man8
90 rm -rf $RPM_BUILD_ROOT
94 %defattr(644,root,root,755)
95 %attr(755,root,root) %{_sbindir}/pethtool
96 %attr(755,root,root) %{_sbindir}/pifconfig
97 %attr(755,root,root) %{py_sitedir}/ethtool.so
98 %if "%{py_ver}" > "2.4"
99 %{py_sitedir}/ethtool-%{version}-py*.egg-info
101 %{_mandir}/man8/pethtool.8*
102 %{_mandir}/man8/pifconfig.8*
106 %files -n python3-ethtool
107 %defattr(644,root,root,755)
108 %attr(755,root,root) %{py3_sitedir}/ethtool.cpython-*.so
109 %{py3_sitedir}/ethtool-%{version}-py*.egg-info