File xorg-x11-proto-devel.spec of Package xorg-x11-proto-devel

#
# spec file for package xorg-x11-proto-devel
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#


%bcond_with VNC

%define xproto xproto-7.0.25.1
%define xcbp xcb-proto-1.10.1
%define vncp vncproto-20070501

Name:           xorg-x11-proto-devel
BuildRequires:  autoconf >= 2.60
BuildRequires:  automake
BuildRequires:  fdupes
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  python-base
BuildRequires:  xmlto
# manual provides to avoid dependency loop
# Provides:       pkgconfig(applewmproto) pkgconfig(bigreqsprot) pkgconfig(compositeproto) pkgconfig(damageproto) pkgconfig(dmxproto) pkgconfig(dri2proto) pkgconfig(evieext) pkgconfig(fixesproto) pkgconfig(fontcacheproto) pkgconfig(fontsproto) pkgconfig(glproto) pkgconfig(inputproto) pkgconfig(kbproto) pkgconfig(libpthread-stubs) pkgconfig(printproto) pkgconfig(randrproto) pkgconfig(recordproto) pkgconfig(renderproto) pkgconfig(resourceproto) pkgconfig(scrnsaveproto) pkgconfig(trapproto) pkgconfig(util-macros) pkgconfig(videoproto) pkgconfig(vncproto) pkgconfig(windowswmproto) pkgconfig(xcb-proto) pkgconfig(xcliplistproto) pkgconfig(xcmiscproto) pkgconfig(x86bigfontproto) pkgconfig(xf86dgaproto) pkgconfig(xf86driproto) pkgconfig(xf86miscproto) pkgconfig(xf86rushproto) pkgconfig(xf86vidmodeproto) pkgconfig(xineramaproto) pkgconfig(xproto) pkgconfig(xproxymanagementprotocol)
Url:            http://xorg.freedesktop.org/
Version:        7.6
Release:        0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Header files and Libraries mandatory for X11 Development
License:        MIT
Group:          Development/Libraries/X11
Source0:        http://xorg.freedesktop.org/releases/individual/proto/applewmproto-1.4.2.tar.bz2
Source1:        http://xorg.freedesktop.org/releases/individual/proto/bigreqsproto-1.1.2.tar.bz2
Source2:        http://xorg.freedesktop.org/releases/individual/proto/compositeproto-0.4.2.tar.bz2
Source3:        http://xorg.freedesktop.org/releases/individual/proto/damageproto-1.2.1.tar.bz2
Source4:        http://xorg.freedesktop.org/releases/individual/proto/dmxproto-2.3.1.tar.bz2
Source5:        http://xorg.freedesktop.org/releases/individual/proto/fixesproto-5.0.tar.bz2
Source6:        http://xorg.freedesktop.org/releases/individual/proto/fontcacheproto-0.1.3.tar.bz2
Source7:        fontsproto-2.1.2.1.tar.bz2
Source8:        http://xorg.freedesktop.org/releases/individual/proto/glproto-1.4.17.tar.bz2
Source9:        http://xorg.freedesktop.org/releases/individual/proto/inputproto-2.3.tar.bz2
Source10:       http://xorg.freedesktop.org/releases/individual/proto/kbproto-1.0.6.tar.bz2
Source11:       http://xorg.freedesktop.org/releases/individual/proto/printproto-1.0.5.tar.bz2
Source12:       http://xorg.freedesktop.org/releases/individual/proto/randrproto-1.4.0.tar.bz2
Source13:       http://xorg.freedesktop.org/releases/individual/proto/recordproto-1.14.2.tar.bz2
Source14:       http://xorg.freedesktop.org/releases/individual/proto/renderproto-0.11.1.tar.bz2
Source15:       http://xorg.freedesktop.org/releases/individual/proto/resourceproto-1.2.0.tar.bz2
Source16:       http://xorg.freedesktop.org/releases/individual/proto/scrnsaverproto-1.2.2.tar.bz2
Source17:       http://xorg.freedesktop.org/releases/individual/proto/trapproto-3.4.3.tar.bz2
Source18:       http://xorg.freedesktop.org/releases/individual/util/util-macros-1.19.0.tar.bz2
Source19:       http://xorg.freedesktop.org/releases/individual/proto/videoproto-2.3.1.tar.bz2
Source20:       http://xorg.freedesktop.org/releases/individual/proto/windowswmproto-1.0.4.tar.bz2
Source21:       http://xorg.freedesktop.org/releases/individual/proto/xcmiscproto-1.2.2.tar.bz2
Source22:       http://xorg.freedesktop.org/releases/individual/proto/xextproto-7.3.0.tar.bz2
Source23:       http://xorg.freedesktop.org/releases/individual/proto/xf86bigfontproto-1.2.0.tar.bz2
Source24:       http://xorg.freedesktop.org/releases/individual/proto/xf86dgaproto-2.1.tar.bz2
Source25:       http://xorg.freedesktop.org/releases/individual/proto/xf86driproto-2.1.1.tar.bz2
Source26:       http://xorg.freedesktop.org/releases/individual/proto/xf86miscproto-0.9.3.tar.bz2
Source27:       http://xorg.freedesktop.org/releases/individual/proto/xf86rushproto-1.1.2.tar.bz2
Source28:       http://xorg.freedesktop.org/releases/individual/proto/xf86vidmodeproto-2.3.1.tar.bz2
Source29:       http://xorg.freedesktop.org/releases/individual/proto/xineramaproto-1.2.1.tar.bz2
Source30:       %{xproto}.tar.bz2
Source31:       http://xorg.freedesktop.org/releases/individual/proto/xproxymanagementprotocol-1.0.3.tar.bz2
Source32:       http://xorg.freedesktop.org/releases/individual/proto/evieext-1.1.1.tar.bz2
Source33:       %{xcbp}.tar.bz2
Source34:       http://xcb.freedesktop.org/dist/libpthread-stubs-0.3.tar.bz2
%if %{with VNC}
Source35:       %{vncp}.tar.bz2
%endif
Source36:       xcliplistproto-20070501.tar.bz2
Source37:       http://xorg.freedesktop.org/releases/individual/proto/dri2proto-2.8.tar.bz2
Source38:       http://xorg.freedesktop.org/archive/individual/proto/dri3proto-1.0.tar.bz2
Source39:       http://xorg.freedesktop.org/archive/individual/proto/presentproto-1.0.tar.bz2

Requires:       glibc-devel
Requires:       python-xcb-proto-devel = %{version}

%description
Header files and libraries needed
to communicate directly with X server and extensions,
including the XML-XCB extension, a full replacement for the original protocol.

%package -n python-xcb-proto-devel
Summary:        Python libraries mandatory for XML-XCB Development
Group:          Development/Libraries/X11
Requires:       python-base = %{py_ver}

%description -n python-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 -T -c %{name}
for i in "$RPM_SOURCE_DIR"/*.tar.bz2
do
%if %{without VNC}
[[ "$i" == "$RPM_SOURCE_DIR"/%{vncp}.tar.bz2 ]] ||
%endif
tar -xjf $i
done
mkdir XML-XCB
ln -tXML-XCB %{xcbp}/COPYING %{xcbp}/README %{xcbp}/NEWS

%build
pushd util-macros-*
  autoreconf -fi
  ./configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
              --prefix=/usr --libdir=%{_libdir}
  export PKG_CONFIG_PATH=$PWD
  make
  cp xorg-macros.m4 ..
popd
export ACLOCAL="aclocal --force -I /usr/share/aclocal -I$PWD"
for ac in */configure.ac
do dir="${ac%/*}"
  pushd "${dir}"
    # Newer packages need this
    if [ ! -e configure ]; then
      NOCONFIGURE=1 autoreconf -fi;
    fi;

    ./configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
                --prefix=/usr --libdir=%{_libdir}
    make
  popd
done

%install
for ac in */Makefile
do dir="${ac%/*}"
  pushd "${dir}"
    make install "DESTDIR=$RPM_BUILD_ROOT"
  popd
done
rm -f $RPM_BUILD_ROOT/usr/share/util-macros/INSTALL
%if %suse_version > 1110
%fdupes -s $RPM_BUILD_ROOT/%python_sitelib/xcbgen/
%else
%fdupes -s $RPM_BUILD_ROOT/usr/%{_lib}/python2.6/site-packages/xcbgen/
%endif

%pre
test -L usr/include/X11 && rm usr/include/X11
exit 0

%files
%defattr(-,root,root)
%doc /usr/share/doc/*
%dir /usr/include/GL
%dir /usr/include/GL/internal
%dir /usr/include/X11/PM
%dir /usr/include/X11/dri
%dir /usr/include/X11/extensions
%dir /usr/include/X11/fonts
/usr/include/GL/*.h
/usr/include/GL/internal/*.h
/usr/include/X11/*.h
/usr/include/X11/PM/*.h
/usr/include/X11/dri/*.h
/usr/include/X11/extensions/*.h
/usr/include/X11/fonts/*.h
/usr/%{_lib}/pkgconfig/*.pc
/usr/share/pkgconfig/*.pc
/usr/share/aclocal/*.m4
/usr/share/man/man7/Xprint.7%{?ext_man}
/usr/share/xcb/
%doc %{xproto}/COPYING %{xproto}/AUTHORS XML-XCB %{xcbp}/doc/xml-xcb.txt

%files -n python-xcb-proto-devel
%defattr(-,root,root)
%if %suse_version > 1110
%python_sitelib/xcbgen/
%else
/usr/%{_lib}/python2.6/site-packages/xcbgen/
%endif
%doc %{xcbp}/COPYING

%changelog
openSUSE Build Service is sponsored by