]> git.pld-linux.org Git - packages/python-ethtool.git/blobdiff - python-ethtool.spec
BR: rpmbuild(macros) >= 1.710
[packages/python-ethtool.git] / python-ethtool.spec
index aff2b585629b431a57a71b47eec01d30004fcfa7..740fede05ec9ec2a73e1517369ef3dc60c17e681 100644 (file)
@@ -7,7 +7,7 @@ Summary:        Python 2 bindings to Ethernet settings
 Summary(pl.UTF-8):     Wiązania Pythona 2 do ustawień sieci Ethernet
 Name:          python-ethtool
 Version:       0.11
-Release:       1
+Release:       3
 License:       GPL v2
 Group:         Libraries/Python
 Source0:       https://fedorahosted.org/releases/p/y/python-ethtool/%{name}-%{version}.tar.bz2
@@ -18,7 +18,7 @@ BuildRequires:        libnl-devel >= 3.2
 BuildRequires: python-devel >= 2
 BuildRequires: python-modules >= 2
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.612
+BuildRequires: rpmbuild(macros) >= 1.710
 %if %{with python3}
 BuildRequires: python3-devel >= 1:3.2
 BuildRequires: python3-modules >= 1:3.2
@@ -55,15 +55,11 @@ port, autonegocjacja oraz lokalizacja PCI.
 
 %build
 %if %{with python2}
-CC="%{__cc}" \
-CFLAGS="%{rpmcflags}" \
-%{__python} setup.py build --build-base build-2
+%py_build
 %endif
 
 %if %{with python3}
-CC="%{__cc}" \
-CFLAGS="%{rpmcflags}" \
-%{__python3} setup.py build --build-base build-3
+%py3_build
 %endif
 
 a2x -d manpage -f manpage man/pethtool.8.asciidoc
@@ -74,22 +70,14 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_sbindir}
 
 %if %{with python2}
-%{__python} setup.py \
-       build --build-base build-2 \
-       install --skip-build \
-               --root=$RPM_BUILD_ROOT \
-               --optimize=2
+%py_install
 
 cp -p pethtool.py $RPM_BUILD_ROOT%{_sbindir}/pethtool
 cp -p pifconfig.py $RPM_BUILD_ROOT%{_sbindir}/pifconfig
 %endif
 
 %if %{with python3}
-%{__python3} setup.py \
-       build --build-base build-3 \
-       install --skip-build \
-               --root=$RPM_BUILD_ROOT \
-               --optimize=2
+%py3_install
 %endif
 
 %clean
This page took 0.034345 seconds and 4 git commands to generate.