]> git.pld-linux.org Git - packages/python-ethtool.git/blame - python-ethtool.spec
- release 2 (by relup.sh)
[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
94636cea 9Version: 0.12
af7c060d 10Release: 2
f11e3208
JB
11License: GPL v2
12Group: Libraries/Python
13Source0: https://fedorahosted.org/releases/p/y/python-ethtool/%{name}-%{version}.tar.bz2
94636cea
AM
14# Source0-md5: 8089d72c9dbe0570bc2aa6ecd59e026f
15Patch0: %{name}-build.patch
f11e3208
JB
16URL: https://fedorahosted.org/python-ethtool/
17BuildRequires: asciidoc
18BuildRequires: libnl-devel >= 3.2
191beaa4
JB
19BuildRequires: pkgconfig
20%if %{with python2}
f11e3208
JB
21BuildRequires: python-devel >= 2
22BuildRequires: python-modules >= 2
191beaa4 23%endif
f11e3208
JB
24%if %{with python3}
25BuildRequires: python3-devel >= 1:3.2
26BuildRequires: python3-modules >= 1:3.2
27%endif
191beaa4
JB
28BuildRequires: rpm-pythonprov
29BuildRequires: rpmbuild(macros) >= 1.714
f11e3208
JB
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33Python 2 bindings for the ethtool kernel interface, that allows
34querying and changing of Ethernet card settings, such as speed, port,
35auto-negotiation, and PCI locations.
36
37%description -l pl.UTF-8
38Wiązania Pythona 2 do interfejsu ethtool w jądrze, pozwalającego na
39odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
40port, autonegocjacja oraz lokalizacja PCI.
41
42%package -n python3-ethtool
43Summary: Python 3 bindings to Ethernet settings
44Summary(pl.UTF-8): Wiązania Pythona 3 do ustawień sieci Ethernet
45Group: Libraries/Python
46
47%description -n python3-ethtool
48Python 3 bindings for the ethtool kernel interface, that allows
49querying and changing of Ethernet card settings, such as speed, port,
50auto-negotiation, and PCI locations.
51
52%description -n python3-ethtool -l pl.UTF-8
53Wiązania Pythona 3 do interfejsu ethtool w jądrze, pozwalającego na
54odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
55port, autonegocjacja oraz lokalizacja PCI.
56
57%prep
58%setup -q
94636cea 59%patch0 -p1
f11e3208
JB
60
61%build
62%if %{with python2}
7330c416 63%py_build
f11e3208
JB
64%endif
65
66%if %{with python3}
7330c416 67%py3_build
f11e3208
JB
68%endif
69
70a2x -d manpage -f manpage man/pethtool.8.asciidoc
71a2x -d manpage -f manpage man/pifconfig.8.asciidoc
72
73%install
74rm -rf $RPM_BUILD_ROOT
191beaa4 75install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8}
f11e3208
JB
76
77%if %{with python2}
7330c416 78%py_install
f11e3208
JB
79
80cp -p pethtool.py $RPM_BUILD_ROOT%{_sbindir}/pethtool
81cp -p pifconfig.py $RPM_BUILD_ROOT%{_sbindir}/pifconfig
191beaa4 82cp -p man/{pethtool,pifconfig}.8 $RPM_BUILD_ROOT%{_mandir}/man8
f11e3208
JB
83%endif
84
85%if %{with python3}
7330c416 86%py3_install
f11e3208
JB
87%endif
88
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%if %{with python2}
93%files
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
100%endif
191beaa4
JB
101%{_mandir}/man8/pethtool.8*
102%{_mandir}/man8/pifconfig.8*
f11e3208
JB
103%endif
104
105%if %{with python3}
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
110%endif
This page took 0.096441 seconds and 4 git commands to generate.