]> git.pld-linux.org Git - packages/python-ethtool.git/blame - python-ethtool.spec
rebuild with tests and docs
[packages/python-ethtool.git] / python-ethtool.spec
CommitLineData
f11e3208
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
8b09e5b7 4%bcond_without python3 # CPython 3.x module
f11e3208
JB
5
6Summary: Python 2 bindings to Ethernet settings
7Summary(pl.UTF-8): Wiązania Pythona 2 do ustawień sieci Ethernet
8Name: python-ethtool
9b1e3abb 9Version: 0.14
bddfaf69 10Release: 6
f11e3208
JB
11License: GPL v2
12Group: Libraries/Python
9b1e3abb
JR
13Source0: https://github.com/fedora-python/python-ethtool/archive/v%{version}/%{name}-%{version}.tar.gz
14# Source0-md5: eaf26f7aedbb1c6e3f7e0b00787b552e
15URL: https://github.com/fedora-python/python-ethtool
f11e3208
JB
16BuildRequires: asciidoc
17BuildRequires: libnl-devel >= 3.2
191beaa4
JB
18BuildRequires: pkgconfig
19%if %{with python2}
f11e3208
JB
20BuildRequires: python-devel >= 2
21BuildRequires: python-modules >= 2
191beaa4 22%endif
f11e3208
JB
23%if %{with python3}
24BuildRequires: python3-devel >= 1:3.2
25BuildRequires: python3-modules >= 1:3.2
26%endif
191beaa4
JB
27BuildRequires: rpm-pythonprov
28BuildRequires: rpmbuild(macros) >= 1.714
f11e3208
JB
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32Python 2 bindings for the ethtool kernel interface, that allows
33querying and changing of Ethernet card settings, such as speed, port,
34auto-negotiation, and PCI locations.
35
36%description -l pl.UTF-8
37Wiązania Pythona 2 do interfejsu ethtool w jądrze, pozwalającego na
38odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
39port, autonegocjacja oraz lokalizacja PCI.
40
41%package -n python3-ethtool
42Summary: Python 3 bindings to Ethernet settings
43Summary(pl.UTF-8): Wiązania Pythona 3 do ustawień sieci Ethernet
44Group: Libraries/Python
45
46%description -n python3-ethtool
47Python 3 bindings for the ethtool kernel interface, that allows
48querying and changing of Ethernet card settings, such as speed, port,
49auto-negotiation, and PCI locations.
50
51%description -n python3-ethtool -l pl.UTF-8
52Wiązania Pythona 3 do interfejsu ethtool w jądrze, pozwalającego na
53odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
54port, autonegocjacja oraz lokalizacja PCI.
55
56%prep
57%setup -q
58
59%build
60%if %{with python2}
7330c416 61%py_build
f11e3208
JB
62%endif
63
64%if %{with python3}
7330c416 65%py3_build
f11e3208
JB
66%endif
67
68a2x -d manpage -f manpage man/pethtool.8.asciidoc
69a2x -d manpage -f manpage man/pifconfig.8.asciidoc
70
71%install
72rm -rf $RPM_BUILD_ROOT
191beaa4 73install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8}
f11e3208
JB
74
75%if %{with python2}
7330c416 76%py_install
f11e3208 77
9b1e3abb
JR
78%{__mv} $RPM_BUILD_ROOT{%{_bindir}/pethtool,%{_sbindir}/pethtool2}
79%{__mv} $RPM_BUILD_ROOT{%{_bindir}/pifconfig,%{_sbindir}/pifconfig2}
f11e3208
JB
80%endif
81
82%if %{with python3}
7330c416 83%py3_install
9b1e3abb
JR
84%{__mv} $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/pethtool
85%{__mv} $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/pifconfig
f11e3208
JB
86%endif
87
9b1e3abb
JR
88cp -p man/{pethtool,pifconfig}.8 $RPM_BUILD_ROOT%{_mandir}/man8
89
f11e3208
JB
90%clean
91rm -rf $RPM_BUILD_ROOT
92
93%if %{with python2}
94%files
95%defattr(644,root,root,755)
9b1e3abb
JR
96%attr(755,root,root) %{_sbindir}/pethtool2
97%attr(755,root,root) %{_sbindir}/pifconfig2
f11e3208 98%{py_sitedir}/ethtool-%{version}-py*.egg-info
9b1e3abb 99%attr(755,root,root) %{py_sitedir}/ethtool.so
f11e3208
JB
100%endif
101
102%if %{with python3}
103%files -n python3-ethtool
104%defattr(644,root,root,755)
9b1e3abb
JR
105%attr(755,root,root) %{_sbindir}/pethtool
106%attr(755,root,root) %{_sbindir}/pifconfig
f11e3208
JB
107%attr(755,root,root) %{py3_sitedir}/ethtool.cpython-*.so
108%{py3_sitedir}/ethtool-%{version}-py*.egg-info
9b1e3abb
JR
109%{_mandir}/man8/pethtool.8*
110%{_mandir}/man8/pifconfig.8*
f11e3208 111%endif
This page took 0.102099 seconds and 4 git commands to generate.