]> git.pld-linux.org Git - packages/python-ethtool.git/blobdiff - python-ethtool.spec
- package man pages
[packages/python-ethtool.git] / python-ethtool.spec
index aff2b585629b431a57a71b47eec01d30004fcfa7..240c7d966c0c816904b615389ec35c9fca566768 100644 (file)
@@ -1,28 +1,32 @@
 #
 # Conditional build:
 %bcond_without python2 # CPython 2.x module
-%bcond_with    python3 # CPython 3.x module (enable when useful - now scripts use python2 shebang)
+%bcond_without python3 # CPython 3.x module
 
 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
+Version:       0.12
 Release:       1
 License:       GPL v2
 Group:         Libraries/Python
 Source0:       https://fedorahosted.org/releases/p/y/python-ethtool/%{name}-%{version}.tar.bz2
-# Source0-md5: b505501d928debf69664b72fafa9d0c3
+# Source0-md5: 8089d72c9dbe0570bc2aa6ecd59e026f
+Patch0:                %{name}-build.patch
 URL:           https://fedorahosted.org/python-ethtool/
 BuildRequires: asciidoc
 BuildRequires: libnl-devel >= 3.2
+BuildRequires: pkgconfig
+%if %{with python2}
 BuildRequires: python-devel >= 2
 BuildRequires: python-modules >= 2
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.612
+%endif
 %if %{with python3}
 BuildRequires: python3-devel >= 1:3.2
 BuildRequires: python3-modules >= 1:3.2
 %endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -52,18 +56,15 @@ port, autonegocjacja oraz lokalizacja PCI.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %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
@@ -71,25 +72,18 @@ a2x -d manpage -f manpage man/pifconfig.8.asciidoc
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sbindir}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8}
 
 %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
+cp -p man/{pethtool,pifconfig}.8 $RPM_BUILD_ROOT%{_mandir}/man8
 %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
@@ -104,6 +98,8 @@ rm -rf $RPM_BUILD_ROOT
 %if "%{py_ver}" > "2.4"
 %{py_sitedir}/ethtool-%{version}-py*.egg-info
 %endif
+%{_mandir}/man8/pethtool.8*
+%{_mandir}/man8/pifconfig.8*
 %endif
 
 %if %{with python3}
This page took 0.089002 seconds and 4 git commands to generate.