commit 506bd1cf230ef29d16897332fb96eed4800c7511
Author: Jakub Bogusz <[email protected]>
Date:   Thu Jan 24 21:21:13 2019 +0100

    - new URLs, updated to 0.6.1
    - added python3- package

 python-pyxattr.spec | 78 ++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 62 insertions(+), 16 deletions(-)
---
diff --git a/python-pyxattr.spec b/python-pyxattr.spec
index 308c88a..2feb48f 100644
--- a/python-pyxattr.spec
+++ b/python-pyxattr.spec
@@ -1,45 +1,91 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
 %define        module  pyxattr
-Summary:       Python module for accessing Extended Attributes of the files
-Summary(pl.UTF-8):     Moduł języka Python pozwalający na dostęp do 
rozszerzonych atrybutów plików
+Summary:       Python 2 module for accessing Extended Attributes of the files
+Summary(pl.UTF-8):     Moduł Pythona 2 pozwalający na dostęp do rozszerzonych 
atrybutów plików
 Name:          python-%{module}
-Version:       0.5.0
-Release:       2
-License:       LGPL
+Version:       0.6.1
+Release:       1
+License:       LGPL v2.1+
 Group:         Libraries/Python
-Source0:       
http://downloads.sourceforge.net/pyxattr/%{module}-%{version}.tar.gz
-# Source0-md5: 0f7ab1e185087329e40f7de218517c84
-URL:           http://pyxattr.sourceforge.net/
-BuildRequires: rpmbuild(macros) >= 1.710
-BuildRequires: attr-devel
-BuildRequires: python-devel
-BuildRequires: python-modules
+Source0:       https://pyxattr.k1024.org/downloads/%{module}-%{version}.tar.gz
+# Source0-md5: 523e9d90f9801141c785d93e6197cc33
+URL:           https://pyxattr.k1024.org/
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.5
+BuildRequires: python-modules >= 1:2.5
 BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-setuptools
+%endif
 BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Python module for accessing Extended Attributes of the files.
+Python 2 module for accessing Extended Attributes of the files.
 
 %description -l pl.UTF-8
-Moduł języka Python pozwalający na dostęp do rozszerzonych atrybutów
+Moduł Pythona 2 pozwalający na dostęp do rozszerzonych atrybutów
+plików.
+
+%package -n python3-%{module}
+Summary:       Python 3 module for accessing Extended Attributes of the files
+Summary(pl.UTF-8):     Moduł Pythona 3 pozwalający na dostęp do rozszerzonych 
atrybutów plików
+Group:         Libraries/Python
+
+%description -n python3-%{module}
+Python 3 module for accessing Extended Attributes of the files.
+
+%description -n python3-%{module} -l pl.UTF-8
+Moduł Pythona 3 pozwalający na dostęp do rozszerzonych atrybutów
 plików.
 
 %prep
 %setup -q -n %{module}-%{version}
 
 %build
-CC="%{__cc}" \
-CFLAGS="%{rpmcppflags} %{rpmcflags}" \
+#CC="%{__cc}" \
+#CFLAGS="%{rpmcppflags} %{rpmcflags}"
+%if %{with python2}
 %py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
 %py_install
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
+%doc NEWS README.rst
 %attr(755,root,root) %{py_sitedir}/xattr.so
 %{py_sitedir}/pyxattr-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/xattr.cpython-*.so
+%{py3_sitedir}/pyxattr-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pyxattr.git/commitdiff/506bd1cf230ef29d16897332fb96eed4800c7511

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to