Accepting request 538124 from home:pluskalm:branches:X11:XOrg

- Build both python2 and python3 versions
- Run spec-cleaner

OBS-URL: https://build.opensuse.org/request/show/538124
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xcb-proto?expand=0&rev=17
This commit is contained in:
Stefan Dirsch 2017-11-02 10:29:25 +00:00 committed by Git OBS Bridge
parent 9757d6605f
commit c59510f37d
2 changed files with 55 additions and 40 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Nov 1 15:09:24 UTC 2017 - mpluskal@suse.com
- Build both python2 and python3 versions
- Run spec-cleaner
------------------------------------------------------------------- -------------------------------------------------------------------
Thu May 19 09:31:46 UTC 2016 - sndirsch@suse.com Thu May 19 09:31:46 UTC 2016 - sndirsch@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package xcb-proto # spec file for package xcb-proto
# #
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,84 +17,93 @@
%define dirsuffix 1.12 %define dirsuffix 1.12
Name: xcb-proto Name: xcb-proto
Version: 7.6_%{dirsuffix} Version: 7.6_%{dirsuffix}
Release: 0 Release: 0
Url: http://xorg.freedesktop.org/
Summary: The X11 Protocol: X Protocol C Bindings Summary: The X11 Protocol: X Protocol C Bindings
License: X11 License: X11
Group: Development/Libraries/X11 Group: Development/Libraries/X11
Url: http://xorg.freedesktop.org/
#Git-Clone: git://anongit.freedesktop.org/xorg/proto/xcb-proto #Git-Clone: git://anongit.freedesktop.org/xorg/proto/xcb-proto
#Git-Web: http://cgit.freedesktop.org/xorg/proto/xcb-proto/ #Git-Web: http://cgit.freedesktop.org/xorg/proto/xcb-proto/
Source: http://xorg.freedesktop.org/archive/individual/xcb/%name-%dirsuffix.tar.bz2 Source: http://xorg.freedesktop.org/archive/individual/xcb/%{name}-%{dirsuffix}.tar.bz2
BuildRequires: autoconf >= 2.57 BuildRequires: autoconf >= 2.57
BuildRequires: automake BuildRequires: automake
BuildRequires: fdupes BuildRequires: fdupes
#BuildRequires: pkgconfig(xorg-macros) >= 1.3 BuildRequires: pkgconfig
BuildRequires: pkg-config BuildRequires: python2-devel
BuildRequires: python-base BuildRequires: python3-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
The XCB protocol headers for X11 development. The XCB protocol headers for X11 development. xcb-proto provides the
xcb-proto provides the XML-XCB protocol descriptions that libxcb uses to XML-XCB protocol descriptions that libxcb uses to generate the majority of
generate the majority of its code and API. its code and API.
%package devel %package devel
Summary: The X11 Protocol: X Protocol C Bindings Summary: The X11 Protocol: X Protocol C Bindings
Group: Development/Libraries/X11 Group: Development/Libraries/X11
Requires: python3-xcb-proto-devel = %{version}
Requires: python-xcb-proto-devel = %{version}
# Added within the 13.2 Development Cycle
#Provides: xorg-x11-proto-devel:%_libdir/pkgconfig/xcb-proto.pc
Provides: xorg-x11-proto-devel = 7.6 Provides: xorg-x11-proto-devel = 7.6
Obsoletes: xorg-x11-proto-devel <= 7.6 Obsoletes: xorg-x11-proto-devel <= 7.6
%description devel %description devel
The XCB protocol headers for X11 development. The XCB protocol headers for X11 development. xcb-proto provides the
xcb-proto provides the XML-XCB protocol descriptions that libxcb uses to XML-XCB protocol descriptions that libxcb uses to generate the majority of
generate the majority of its code and API. its code and API.
%package -n python-xcb-proto-devel %package -n python2-xcb-proto-devel
Summary: Python libraries mandatory for XML-XCB Development Summary: Python libraries mandatory for XML-XCB Development
Group: Development/Libraries/X11 Group: Development/Libraries/X11
Requires: python-base = %{py_ver} Provides: python-xcb-proto-devel = %{version}-%{release}
Obsoletes: python-xcb-proto-devel < %{version}-%{release}
Provides: python-xcb-proto-devel = 7.6 Provides: python-xcb-proto-devel = 7.6
Obsoletes: python-xcb-proto-devel <= 7.6 Obsoletes: python-xcb-proto-devel <= 7.6
%description -n python-xcb-proto-devel %description -n python2-xcb-proto-devel
Language-independent Python Language-independent Python libraries that used to parse an XML description
libraries that used to parse an XML description and create objects and create objects used by Python code generators in individual language
used by Python code generators in individual language bindings. bindings.
%package -n python3-xcb-proto-devel
Summary: Python libraries mandatory for XML-XCB Development
Group: Development/Libraries/X11
%description -n python3-xcb-proto-devel
Language-independent Python libraries that used to parse an XML description
and create objects used by Python code generators in individual language
bindings.
%prep %prep
%setup -q -n %{name}-%{dirsuffix} %setup -q -n %{name}-%{dirsuffix}
%build %build
autoreconf -fi autoreconf -fiv
# In order to build both python2 and python3 version we need to run
# configure and install twice
export PYTHON="python2"
%configure %configure
make %{?_smp_mflags} make %{?_smp_mflags}
%make_install
export PYTHON="python3"
%configure
make %{?_smp_mflags}
%make_install
%install %install
make install DESTDIR="%buildroot" %fdupes -s %{buildroot}/%{_prefix}
%fdupes -s %buildroot/%_prefix
%files devel %files devel
%defattr(-,root,root) %dir %{_datadir}/xcb
%dir %_datadir/xcb %doc %{_datadir}/xcb/*
%doc %_datadir/xcb/* %{_libdir}/pkgconfig/*.pc
%_libdir/pkgconfig/*.pc
%files -n python-xcb-proto-devel %files -n python2-xcb-proto-devel
%defattr(-,root,root)
%doc COPYING %doc COPYING
%if %suse_version > 1110 %{python_sitelib}/xcbgen/
%python_sitelib/xcbgen/
%else %files -n python3-xcb-proto-devel
%_libdir/python2.6/site-packages/xcbgen/ %doc COPYING
%endif %{python3_sitelib}/xcbgen/
%changelog %changelog