# Conditional build:
%bcond_without apidocs # don't build API documentation
%bcond_without static_libs # don't build static libraries
-#
+
Summary: Wayland - protocol for a compositor to talk to its clients
Summary(pl.UTF-8): Wayland - protokół między serwerem składającym a klientami
Name: wayland
-Version: 1.0.6
+Version: 1.12.0
Release: 1
License: MIT
Group: Libraries
-Source0: http://wayland.freedesktop.org/releases/%{name}-%{version}.tar.xz
-# Source0-md5: 936a2590aea69fa3c0cf234d54b9137c
-Patch0: %{name}-publican.patch
+Source0: https://wayland.freedesktop.org/releases/%{name}-%{version}.tar.xz
+# Source0-md5: ee615e2d1e205eec48b02f069327eb96
Patch1: %{name}-man.patch
-URL: http://wayland.freedesktop.org/
+URL: https://wayland.freedesktop.org/
BuildRequires: autoconf >= 2.64
BuildRequires: automake >= 1:1.11
-BuildRequires: docbook-style-xsl
-BuildRequires: doxygen
-BuildRequires: expat-devel
-BuildRequires: libffi-devel
+BuildRequires: expat-devel >= 1.95
+BuildRequires: libffi-devel >= 3
BuildRequires: libtool >= 2:2.2
-BuildRequires: libxslt-progs
+# for DTD valudation
+BuildRequires: libxml2-devel >= 2.0
BuildRequires: pkgconfig
-BuildRequires: pkgconfig(libffi)
-%{?with_apidocs:BuildRequires: publican >= 3}
+%if %{with apidocs}
+BuildRequires: docbook-style-xsl
+BuildRequires: doxygen >= 1.6.0
+BuildRequires: graphviz >= 2.26.0
+BuildRequires: libxslt-progs
+BuildRequires: xmlto
+%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Summary: Wayland API and protocol documentation
Summary(pl.UTF-8): Dokumentacja API biblioteki oraz protokołu Wayland
Group: Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description apidocs
Wayland API and protocol documentation.
%prep
%setup -q
-
-# this file is required by publican 3.0; publican patch adds it in en-US dir
-test ! -f doc/Wayland/en_US/Revision_History.xml
-
-%patch0 -p1
%patch1 -p1
# force regeneration (.so link is broken, double man3/)
%{__autoheader}
%{__automake}
%configure \
+ %{!?with_apidocs:--disable-documentation} \
--disable-silent-rules \
%{!?with_static_libs:--disable-static}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+# referenced by some installed wl_*.3 man pages
+cp -p doc/doxygen/man/man3/wayland-{client-core,server,server-core,util}.h.3 \
+ doc/doxygen/man/man3/wayland-{client,server,shm,util}.c.3 $RPM_BUILD_ROOT%{_mandir}/man3
+
# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libwayland-*.la
+%if %{with apidocs}
# packaged as %doc in -devel
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/wayland
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libwayland-cursor.so
%attr(755,root,root) %{_libdir}/libwayland-server.so
%{_includedir}/wayland-*.h
+%dir %{_datadir}/wayland
+%{_datadir}/wayland/wayland.dtd
+%{_datadir}/wayland/wayland.xml
+%{_datadir}/wayland/wayland-scanner.mk
%{_pkgconfigdir}/wayland-client.pc
%{_pkgconfigdir}/wayland-cursor.pc
+%{_pkgconfigdir}/wayland-scanner.pc
%{_pkgconfigdir}/wayland-server.pc
%{_aclocaldir}/wayland-scanner.m4
-%{_aclocaldir}/wayland-scanner.mk
-%{_mandir}/man3/wl_display_connect.3*
-%{_mandir}/man3/wl_display_connect_to_fd*
+%if %{with apidocs}
+%{_mandir}/man3/wayland-*.c.3*
+%{_mandir}/man3/wayland-*.h.3*
+%{_mandir}/man3/wl_*.3*
+%endif
%if %{with static_libs}
%files static
%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
-%doc doc/Wayland/Wayland/en-US/html/*
+%doc doc/publican/Wayland/en-US/html/*
%endif