xcb-proto/xcb-proto.spec

110 lines
3.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package xcb-proto
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define dirsuffix 1.12
Name: xcb-proto
Version: 7.6_%{dirsuffix}
Release: 0
Summary: The X11 Protocol: X Protocol C Bindings
License: X11
Group: Development/Libraries/X11
Url: http://xorg.freedesktop.org/
#Git-Clone: git://anongit.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
BuildRequires: autoconf >= 2.57
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python2-base
BuildRequires: python3-base
%description
The XCB protocol headers for X11 development. xcb-proto provides the
XML-XCB protocol descriptions that libxcb uses to generate the majority of
its code and API.
%package devel
Summary: The X11 Protocol: X Protocol C Bindings
Group: Development/Libraries/X11
Requires: python3-xcb-proto-devel = %{version}
Provides: xorg-x11-proto-devel = 7.6
Obsoletes: xorg-x11-proto-devel <= 7.6
%description devel
The XCB protocol headers for X11 development. xcb-proto provides the
XML-XCB protocol descriptions that libxcb uses to generate the majority of
its code and API.
%package -n python2-xcb-proto-devel
Summary: Python libraries mandatory for XML-XCB Development
Group: Development/Libraries/X11
Provides: python-xcb-proto-devel = %{version}-%{release}
Obsoletes: python-xcb-proto-devel < %{version}-%{release}
Provides: python-xcb-proto-devel = 7.6
Obsoletes: python-xcb-proto-devel <= 7.6
%description -n python2-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.
%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
%setup -q -n %{name}-%{dirsuffix}
%build
autoreconf -fiv
# In order to build both python2 and python3 version we need to run
# configure and install twice
export PYTHON="python2"
%configure
make %{?_smp_mflags}
%make_install
export PYTHON="python3"
%configure
make %{?_smp_mflags}
%make_install
%install
%fdupes -s %{buildroot}/%{_prefix}
%files devel
%dir %{_datadir}/xcb
%doc %{_datadir}/xcb/*
%{_libdir}/pkgconfig/*.pc
%files -n python2-xcb-proto-devel
%doc COPYING
%{python_sitelib}/xcbgen/
%files -n python3-xcb-proto-devel
%doc COPYING
%{python3_sitelib}/xcbgen/
%changelog