1 | %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} |
---|
2 | %{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")} |
---|
3 | |
---|
4 | Summary: Ethernet settings python bindings |
---|
5 | Summary(ja): ethtool の python バインディング |
---|
6 | Name: python-ethtool |
---|
7 | Version: 0.3 |
---|
8 | Release: 3%{?_dist_release} |
---|
9 | URL: http://git.kernel.org/?p=linux/kernel/git/acme/python-ethtool.git |
---|
10 | Source: http://userweb.kernel.org/~acme/python-ethtool/%{name}-%{version}.tar.bz2 |
---|
11 | License: GPLv2 |
---|
12 | Group: System Environment/Libraries |
---|
13 | BuildRequires: python-devel |
---|
14 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
15 | |
---|
16 | %description |
---|
17 | Python bindings for the ethtool kernel interface, that allows querying and |
---|
18 | changing of ethernet card settings, such as speed, port, autonegotiation, and |
---|
19 | PCI locations. |
---|
20 | |
---|
21 | %prep |
---|
22 | %setup -q |
---|
23 | |
---|
24 | %build |
---|
25 | %{__python} setup.py build |
---|
26 | |
---|
27 | %install |
---|
28 | rm -rf %{buildroot} |
---|
29 | %{__python} setup.py install --skip-build --root %{buildroot} |
---|
30 | mkdir -p %{buildroot}%{_sbindir} |
---|
31 | cp -p pethtool.py %{buildroot}%{_sbindir}/pethtool |
---|
32 | cp -p pifconfig.py %{buildroot}%{_sbindir}/pifconfig |
---|
33 | |
---|
34 | %clean |
---|
35 | rm -rf %{buildroot} |
---|
36 | |
---|
37 | %files |
---|
38 | %defattr(-,root,root) |
---|
39 | %doc COPYING |
---|
40 | %{_sbindir}/pethtool |
---|
41 | %{_sbindir}/pifconfig |
---|
42 | %{python_sitearch}/ethtool.so |
---|
43 | %if "%{python_ver}" >= "2.5" |
---|
44 | %{python_sitearch}/*.egg-info |
---|
45 | %endif |
---|
46 | |
---|
47 | %changelog |
---|
48 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.3-3 |
---|
49 | - rebuild with python-2.7.2 |
---|
50 | |
---|
51 | * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.3-2 |
---|
52 | - rebuild with python-2.6 |
---|
53 | |
---|
54 | * Wed Sep 23 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.3-1 |
---|
55 | - initial build for Vine Linux |
---|
56 | |
---|
57 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-5 |
---|
58 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
59 | |
---|
60 | * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4 |
---|
61 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
62 | |
---|
63 | * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.3-3 |
---|
64 | - Rebuild for Python 2.6 |
---|
65 | |
---|
66 | * Fri Sep 5 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.3-2 |
---|
67 | - Rewrote build and install sections as part of the fedora review process |
---|
68 | BZ #459549 |
---|
69 | |
---|
70 | * Tue Aug 26 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.3-1 |
---|
71 | - Add get_flags method from the first python-ethtool contributor, yay |
---|
72 | - Add pifconfig command, that mimics the ifconfig tool using the |
---|
73 | bindings available |
---|
74 | |
---|
75 | * Wed Aug 20 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.2-1 |
---|
76 | - Expand description and summary fields, as part of the fedora |
---|
77 | review process. |
---|
78 | |
---|
79 | * Tue Jun 10 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-3 |
---|
80 | - add dist to the release tag |
---|
81 | |
---|
82 | * Tue Dec 18 2007 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-2 |
---|
83 | - First build into MRG repo |
---|
84 | |
---|
85 | * Tue Dec 18 2007 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-1 |
---|
86 | - Get ethtool code from rhpl 0.212 |
---|