]> git.pld-linux.org Git - packages/python-ethtool.git/blame - python-ethtool.spec
BR: rpmbuild(macros) >= 1.710
[packages/python-ethtool.git] / python-ethtool.spec
CommitLineData
f11e3208
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_with python3 # CPython 3.x module (enable when useful - now scripts use python2 shebang)
5
6Summary: Python 2 bindings to Ethernet settings
7Summary(pl.UTF-8): Wiązania Pythona 2 do ustawień sieci Ethernet
8Name: python-ethtool
9Version: 0.11
b0e123ba 10Release: 3
f11e3208
JB
11License: GPL v2
12Group: Libraries/Python
13Source0: https://fedorahosted.org/releases/p/y/python-ethtool/%{name}-%{version}.tar.bz2
14# Source0-md5: b505501d928debf69664b72fafa9d0c3
15URL: https://fedorahosted.org/python-ethtool/
16BuildRequires: asciidoc
17BuildRequires: libnl-devel >= 3.2
18BuildRequires: python-devel >= 2
19BuildRequires: python-modules >= 2
20BuildRequires: rpm-pythonprov
0e2033e3 21BuildRequires: rpmbuild(macros) >= 1.710
f11e3208
JB
22%if %{with python3}
23BuildRequires: python3-devel >= 1:3.2
24BuildRequires: python3-modules >= 1:3.2
25%endif
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29Python 2 bindings for the ethtool kernel interface, that allows
30querying and changing of Ethernet card settings, such as speed, port,
31auto-negotiation, and PCI locations.
32
33%description -l pl.UTF-8
34Wiązania Pythona 2 do interfejsu ethtool w jądrze, pozwalającego na
35odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
36port, autonegocjacja oraz lokalizacja PCI.
37
38%package -n python3-ethtool
39Summary: Python 3 bindings to Ethernet settings
40Summary(pl.UTF-8): Wiązania Pythona 3 do ustawień sieci Ethernet
41Group: Libraries/Python
42
43%description -n python3-ethtool
44Python 3 bindings for the ethtool kernel interface, that allows
45querying and changing of Ethernet card settings, such as speed, port,
46auto-negotiation, and PCI locations.
47
48%description -n python3-ethtool -l pl.UTF-8
49Wiązania Pythona 3 do interfejsu ethtool w jądrze, pozwalającego na
50odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
51port, autonegocjacja oraz lokalizacja PCI.
52
53%prep
54%setup -q
55
56%build
57%if %{with python2}
7330c416 58%py_build
f11e3208
JB
59%endif
60
61%if %{with python3}
7330c416 62%py3_build
f11e3208
JB
63%endif
64
65a2x -d manpage -f manpage man/pethtool.8.asciidoc
66a2x -d manpage -f manpage man/pifconfig.8.asciidoc
67
68%install
69rm -rf $RPM_BUILD_ROOT
70install -d $RPM_BUILD_ROOT%{_sbindir}
71
72%if %{with python2}
7330c416 73%py_install
f11e3208
JB
74
75cp -p pethtool.py $RPM_BUILD_ROOT%{_sbindir}/pethtool
76cp -p pifconfig.py $RPM_BUILD_ROOT%{_sbindir}/pifconfig
77%endif
78
79%if %{with python3}
7330c416 80%py3_install
f11e3208
JB
81%endif
82
83%clean
84rm -rf $RPM_BUILD_ROOT
85
86%if %{with python2}
87%files
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
94%endif
95%endif
96
97%if %{with python3}
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
102%endif
This page took 0.113486 seconds and 4 git commands to generate.