]> git.pld-linux.org Git - packages/python-ethtool.git/blob - python-ethtool.spec
83c4b5e5d8bfc19c4eb3b2de350bb531e269a9b3
[packages/python-ethtool.git] / python-ethtool.spec
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
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.11
10 Release:        3
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:  b505501d928debf69664b72fafa9d0c3
15 URL:            https://fedorahosted.org/python-ethtool/
16 BuildRequires:  asciidoc
17 BuildRequires:  libnl-devel >= 3.2
18 BuildRequires:  python-devel >= 2
19 BuildRequires:  python-modules >= 2
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.612
22 %if %{with python3}
23 BuildRequires:  python3-devel >= 1:3.2
24 BuildRequires:  python3-modules >= 1:3.2
25 %endif
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Python 2 bindings for the ethtool kernel interface, that allows
30 querying and changing of Ethernet card settings, such as speed, port,
31 auto-negotiation, and PCI locations.
32
33 %description -l pl.UTF-8
34 Wiązania Pythona 2 do interfejsu ethtool w jądrze, pozwalającego na
35 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
36 port, autonegocjacja oraz lokalizacja PCI.
37
38 %package -n python3-ethtool
39 Summary:        Python 3 bindings to Ethernet settings
40 Summary(pl.UTF-8):      Wiązania Pythona 3 do ustawień sieci Ethernet
41 Group:          Libraries/Python
42
43 %description -n python3-ethtool
44 Python 3 bindings for the ethtool kernel interface, that allows
45 querying and changing of Ethernet card settings, such as speed, port,
46 auto-negotiation, and PCI locations.
47
48 %description -n python3-ethtool -l pl.UTF-8
49 Wiązania Pythona 3 do interfejsu ethtool w jądrze, pozwalającego na
50 odczyt i zmianę ustawień kart sieciowych Ethenet, takich jak szybkość,
51 port, autonegocjacja oraz lokalizacja PCI.
52
53 %prep
54 %setup -q
55
56 %build
57 %if %{with python2}
58 %py_build
59 %endif
60
61 %if %{with python3}
62 %py3_build
63 %endif
64
65 a2x -d manpage -f manpage man/pethtool.8.asciidoc
66 a2x -d manpage -f manpage man/pifconfig.8.asciidoc
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT%{_sbindir}
71
72 %if %{with python2}
73 %py_install
74
75 cp -p pethtool.py $RPM_BUILD_ROOT%{_sbindir}/pethtool
76 cp -p pifconfig.py $RPM_BUILD_ROOT%{_sbindir}/pifconfig
77 %endif
78
79 %if %{with python3}
80 %py3_install
81 %endif
82
83 %clean
84 rm -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.037478 seconds and 2 git commands to generate.