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://github.com/fedora-python/python-ethtool/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: eaf26f7aedbb1c6e3f7e0b00787b552e
15 URL: https://github.com/fedora-python/python-ethtool
16 BuildRequires: asciidoc
17 BuildRequires: libnl-devel >= 3.2
18 BuildRequires: pkgconfig
20 BuildRequires: python-devel >= 2
21 BuildRequires: python-modules >= 2
24 BuildRequires: python3-devel >= 1:3.2
25 BuildRequires: python3-modules >= 1:3.2
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.714
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Python 2 bindings for the ethtool kernel interface, that allows
33 querying and changing of Ethernet card settings, such as speed, port,
34 auto-negotiation, and PCI locations.
36 %description -l pl.UTF-8
37 Wiązania Pythona 2 do interfejsu ethtool w jądrze, pozwalającego na
38 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
39 port, autonegocjacja oraz lokalizacja PCI.
41 %package -n python3-ethtool
42 Summary: Python 3 bindings to Ethernet settings
43 Summary(pl.UTF-8): Wiązania Pythona 3 do ustawień sieci Ethernet
44 Group: Libraries/Python
46 %description -n python3-ethtool
47 Python 3 bindings for the ethtool kernel interface, that allows
48 querying and changing of Ethernet card settings, such as speed, port,
49 auto-negotiation, and PCI locations.
51 %description -n python3-ethtool -l pl.UTF-8
52 Wiązania Pythona 3 do interfejsu ethtool w jądrze, pozwalającego na
53 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
54 port, autonegocjacja oraz lokalizacja PCI.
68 a2x -d manpage -f manpage man/pethtool.8.asciidoc
69 a2x -d manpage -f manpage man/pifconfig.8.asciidoc
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8}
78 %{__mv} $RPM_BUILD_ROOT{%{_bindir}/pethtool,%{_sbindir}/pethtool2}
79 %{__mv} $RPM_BUILD_ROOT{%{_bindir}/pifconfig,%{_sbindir}/pifconfig2}
84 %{__mv} $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/pethtool
85 %{__mv} $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/pifconfig
88 cp -p man/{pethtool,pifconfig}.8 $RPM_BUILD_ROOT%{_mandir}/man8
91 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %attr(755,root,root) %{_sbindir}/pethtool2
97 %attr(755,root,root) %{_sbindir}/pifconfig2
98 %{py_sitedir}/ethtool-%{version}-py*.egg-info
99 %attr(755,root,root) %{py_sitedir}/ethtool.so
103 %files -n python3-ethtool
104 %defattr(644,root,root,755)
105 %attr(755,root,root) %{_sbindir}/pethtool
106 %attr(755,root,root) %{_sbindir}/pifconfig
107 %attr(755,root,root) %{py3_sitedir}/ethtool.cpython-*.so
108 %{py3_sitedir}/ethtool-%{version}-py*.egg-info
109 %{_mandir}/man8/pethtool.8*
110 %{_mandir}/man8/pifconfig.8*