]> git.pld-linux.org Git - packages/xcb-proto.git/commitdiff
shift python files to python-xcbgen, pacakge python3 variant; rel 2
authorJan Palus <atler@pld-linux.org>
Mon, 6 Apr 2020 23:34:28 +0000 (01:34 +0200)
committerJan Palus <atler@pld-linux.org>
Mon, 6 Apr 2020 23:34:28 +0000 (01:34 +0200)
xcb-proto.spec

index 329f4ebac1af1d05a6ae94d6e8645d6876973417..1c05aabb0760e1898489a257d293a9303ca7de8b 100644 (file)
@@ -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
This page took 0.262683 seconds and 4 git commands to generate.