File wayland.spec of Package wayland.2655

#
# spec file for package wayland
#
# Copyright (c) 2015 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/
#


Name:           wayland
%define lname	libwayland0
Version:        1.2.1
Release:        0
Summary:        Wayland Compositor Infrastructure
License:        HPND
Group:          Development/Libraries/C and C++
Url:            http://wayland.freedesktop.org/

#Git-Clone:	git://anongit.freedesktop.org/wayland/wayland
#Git-Web:	http://cgit.freedesktop.org/wayland/wayland/
Source:         http://wayland.freedesktop.org/releases/%name-%version.tar.xz
Patch0:         add-api-to-protect-access-to-an-shm-buffer.patch
Patch1:         add-subsurfaces-to-the-core.patch
Patch2:         add-release-requests.patch
Patch3:         fix-order-of-messages.patch
Patch4:         emit-wl__destroy_stub.patch
Patch5:         add-pthread-to-am_cflags.patch
Patch6:         add-pthread-to-Makefile.in.patch
Patch7:         0001-Protocol-Added-destructor-to-wl_data_device-interfac.patch
Patch8:         0001-protocol-add-repeat_info-event-to-wl_keyboard.patch
Patch9:         0001-scanner-Generate-macros-for-getting-the-since-versio.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#git#BuildRequires:  autoconf >= 2.64
#git#BuildRequires:  automake >= 1.11
#git#BuildRequires:	libtool >= 2.2
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  libexpat-devel
BuildRequires:  pkgconfig
BuildRequires:  xz
BuildRequires:  pkgconfig(libffi)

%description
Wayland is a protocol for a compositor to talk to its clients as well
as a C library implementation of that protocol. The compositor can be
a standalone display server running on Linux kernel modesetting and
evdev input devices, an X application, or a wayland client itself.
The clients can be traditional applications, X servers (rootless or
fullscreen) or other display servers.

%package -n libwayland-client0
Summary:        Wayland core client library
Group:          System/Libraries

%description -n libwayland-client0
Wayland is a protocol for a compositor to talk to its clients as well
as a C library implementation of that protocol. The compositor can be
a standalone display server running on Linux kernel modesetting and
evdev input devices, an X application, or a wayland client itself.
The clients can be traditional applications, X servers (rootless or
fullscreen) or other display servers.

%package -n libwayland-cursor0
Summary:        Wayland cursor library
Group:          System/Libraries

%description -n libwayland-cursor0
The purpose of this library is to be the equivalent of libXcursor in
the X world. This library is compatible with X cursor themes and
loads them directly into an shm pool making it easy for the clients
to get buffer for each cursor image.

%package -n libwayland-server0
Summary:        Wayland core server library
Group:          System/Libraries

%description -n libwayland-server0
Wayland is a protocol for a compositor to talk to its clients as well
as a C library implementation of that protocol. The compositor can be
a standalone display server running on Linux kernel modesetting and
evdev input devices, an X application, or a wayland client itself.
The clients can be traditional applications, X servers (rootless or
fullscreen) or other display servers.

%package devel
Summary:        Development files for the Wayland Compositor Infrastructure
Group:          Development/Libraries/C and C++
Requires:       libwayland-client0 = %version
Requires:       libwayland-cursor0 = %version
Requires:       libwayland-server0 = %version

%description devel
Wayland is a protocol for a compositor to talk to its clients as well
as a C library implementation of that protocol. The compositor can be
a standalone display server running on Linux kernel modesetting and
evdev input devices, an X application, or a wayland client itself.
The clients can be traditional applications, X servers (rootless or
fullscreen) or other display servers.

This package contains all necessary include files and libraries needed
to develop applications that require these.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1

%build
if [ ! -e configure ]; then
	autoreconf -fi;
fi;
# Ensure people will use pkgconfig to locate headers
%configure --disable-static --includedir="%_includedir/pkg/%name"
make %{?_smp_mflags}

%install
b="%buildroot";
make install DESTDIR="$b";
rm -f "$b/%_libdir"/*.la;
%fdupes %buildroot/%_prefix

%check
%if ! 0%{?qemu_user_space_build}
mkdir -m go-rwx xdg;
XDG_RUNTIME_DIR="$PWD/xdg" make check %{?_smp_mflags};
%endif

%post -n libwayland-client0 -p /sbin/ldconfig
%postun -n libwayland-client0 -p /sbin/ldconfig
%post -n libwayland-cursor0 -p /sbin/ldconfig
%postun -n libwayland-cursor0 -p /sbin/ldconfig
%post -n libwayland-server0 -p /sbin/ldconfig
%postun -n libwayland-server0 -p /sbin/ldconfig

%files -n libwayland-client0
%defattr(-,root,root)
%_libdir/libwayland-client.so.0*

%files -n libwayland-cursor0
%defattr(-,root,root)
%_libdir/libwayland-cursor.so.0*

%files -n libwayland-server0
%defattr(-,root,root)
%_libdir/libwayland-server.so.0*

%files devel
%defattr(-,root,root)
%_bindir/wayland-scanner
%_includedir/pkg/
%_libdir/libwayland-*.so
%_libdir/pkgconfig/wayland-*.pc
%_datadir/aclocal/
%_datadir/pkgconfig/wayland-*.pc
%_datadir/wayland/
%_mandir/man3/wl_*.3*

%changelog
openSUSE Build Service is sponsored by