[packages/xcb-proto] shift python files to python-xcbgen, pacakge python3 variant; rel 2
atler
atler at pld-linux.org
Tue Apr 7 01:36:47 CEST 2020
commit 09b3dbc3aedec8fa5cf6175e61139dce9c835745
Author: Jan Palus <atler at pld-linux.org>
Date: Tue Apr 7 01:34:28 2020 +0200
shift python files to python-xcbgen, pacakge python3 variant; rel 2
xcb-proto.spec | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 61 insertions(+), 2 deletions(-)
---
diff --git a/xcb-proto.spec b/xcb-proto.spec
index 329f4eb..1c05aab 100644
--- a/xcb-proto.spec
+++ b/xcb-proto.spec
@@ -1,8 +1,12 @@
+#
+# Conditional build:
+%bcond_without python3 # CPython 3.x module
+
Summary: XML-XCB protocol description files
Summary(pl.UTF-8): Pliki opisu protokołu XML-XCB
Name: xcb-proto
Version: 1.14
-Release: 1
+Release: 2
License: MIT
Group: Development/Libraries
#Source0: https://xcb.freedesktop.org/dist/%{name}-%{version}.tar.bz2
@@ -11,11 +15,13 @@ Source0: https://xorg.freedesktop.org/releases/individual/proto/%{name}-%{versio
URL: https://xcb.freedesktop.org/
BuildRequires: libxml2-progs
BuildRequires: python >= 1:2.5
+%{?with_python3:BuildRequires: python3}
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.219
BuildRequires: tar >= 1:1.22
BuildRequires: xz
Requires: python >= 1:2.5
+Requires: python-xcbgen = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -32,16 +38,60 @@ umożliwić wykorzystanie przez inne projekty, takie jak dodatkowe
dowiązania dla innych języków, analizatory protokołu czy generatory
dokumentacji.
+%package -n python-xcbgen
+Summary: Python 2 xcbgen module
+Summary(pl.UTF-8): Moduł xcbgen dla Pythona 2
+Group: Libraries/Python
+
+%description -n python-xcbgen
+Python 2 xcbgen module.
+
+%description -n python-xcbgen -l pl.UTF-8
+Moduł xcbgen dla Pythona 2.
+
+%package -n python3-xcbgen
+Summary: Python 3 xcbgen module
+Summary(pl.UTF-8): Moduł xcbgen dla Pythona 3
+Group: Libraries/Python
+
+%description -n python3-xcbgen
+Python 3 xcbgen module.
+
+%description -n python3-xcbgen -l pl.UTF-8
+Moduł xcbgen dla Pythona 3.
+
%prep
%setup -q
+%if %{with python3}
+mkdir build3
+%endif
+mkdir build2
%build
-%configure
+%if %{with python3}
+cd build3
+PYTHON=%{__python3} \
+../%configure
+%{__make}
+cd ..
+%endif
+
+cd build2
+PYTHON=%{__python} \
+../%configure
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
+%if %{with python3}
+cd build3
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+cd ..
+%endif
+
+cd build2
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
@@ -57,4 +107,13 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING NEWS README.md TODO doc/xml-xcb.txt
%{_datadir}/xcb
%{_pkgconfigdir}/xcb-proto.pc
+
+%files -n python-xcbgen
+%defattr(644,root,root,755)
%{py_sitescriptdir}/xcbgen
+
+%if %{with python3}
+%files -n python3-xcbgen
+%defattr(644,root,root,755)
+%{py3_sitedir}/xcbgen
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xcb-proto.git/commitdiff/09b3dbc3aedec8fa5cf6175e61139dce9c835745
More information about the pld-cvs-commit
mailing list