]> git.pld-linux.org Git - packages/python-ethtool.git/blob - python-ethtool.spec
- 0.12 has bunch of python3 fixes, so reenable
[packages/python-ethtool.git] / python-ethtool.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 Summary:        Python 2 bindings to Ethernet settings
7 Summary(pl.UTF-8):      Wiązania Pythona 2 do ustawień sieci Ethernet
8 Name:           python-ethtool
9 Version:        0.12
10 Release:        1
11 License:        GPL v2
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:  python-devel >= 2
20 BuildRequires:  python-modules >= 2
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.710
23 %if %{with python3}
24 BuildRequires:  python3-devel >= 1:3.2
25 BuildRequires:  python3-modules >= 1:3.2
26 %endif
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 Python 2 bindings for the ethtool kernel interface, that allows
31 querying and changing of Ethernet card settings, such as speed, port,
32 auto-negotiation, and PCI locations.
33
34 %description -l pl.UTF-8
35 Wiązania Pythona 2 do interfejsu ethtool w jądrze, pozwalającego na
36 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
37 port, autonegocjacja oraz lokalizacja PCI.
38
39 %package -n python3-ethtool
40 Summary:        Python 3 bindings to Ethernet settings
41 Summary(pl.UTF-8):      Wiązania Pythona 3 do ustawień sieci Ethernet
42 Group:          Libraries/Python
43
44 %description -n python3-ethtool
45 Python 3 bindings for the ethtool kernel interface, that allows
46 querying and changing of Ethernet card settings, such as speed, port,
47 auto-negotiation, and PCI locations.
48
49 %description -n python3-ethtool -l pl.UTF-8
50 Wiązania Pythona 3 do interfejsu ethtool w jądrze, pozwalającego na
51 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
52 port, autonegocjacja oraz lokalizacja PCI.
53
54 %prep
55 %setup -q
56 %patch0 -p1
57
58 %build
59 %if %{with python2}
60 %py_build
61 %endif
62
63 %if %{with python3}
64 %py3_build
65 %endif
66
67 a2x -d manpage -f manpage man/pethtool.8.asciidoc
68 a2x -d manpage -f manpage man/pifconfig.8.asciidoc
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT%{_sbindir}
73
74 %if %{with python2}
75 %py_install
76
77 cp -p pethtool.py $RPM_BUILD_ROOT%{_sbindir}/pethtool
78 cp -p pifconfig.py $RPM_BUILD_ROOT%{_sbindir}/pifconfig
79 %endif
80
81 %if %{with python3}
82 %py3_install
83 %endif
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %files
90 %defattr(644,root,root,755)
91 %attr(755,root,root) %{_sbindir}/pethtool
92 %attr(755,root,root) %{_sbindir}/pifconfig
93 %attr(755,root,root) %{py_sitedir}/ethtool.so
94 %if "%{py_ver}" > "2.4"
95 %{py_sitedir}/ethtool-%{version}-py*.egg-info
96 %endif
97 %endif
98
99 %if %{with python3}
100 %files -n python3-ethtool
101 %defattr(644,root,root,755)
102 %attr(755,root,root) %{py3_sitedir}/ethtool.cpython-*.so
103 %{py3_sitedir}/ethtool-%{version}-py*.egg-info
104 %endif
This page took 0.092962 seconds and 4 git commands to generate.