File wlroots.spec of Package wlroots
#
# spec file for package wlroots
#
# Copyright (c) 2024 mantarimay
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
#define ver_major #(echo #{version} | cut -c 1)
#define ver_minor #(echo $(($(echo #{version} | cut -c 3-4)+1)))
%define ver_major 0
%define ver_minor 20
%define api %{ver_major}_%{ver_minor}
%define libname libwlroots%{api}
%define wl_ver wlroots-%{ver_major}.%{ver_minor}
%define ffmpeg_ver 7
%bcond_without xcb_errors
%bcond_without test
Name: wlroots
Version: 0.17.0
Release: 0
Summary: Modular Wayland compositor library
License: MIT
Group: System/GUI/Other
URL: https://gitlab.freedesktop.org/wlroots/wlroots
Source0: %{name}-%{version}.tar.xz
BuildRequires: glslang-devel
BuildRequires: meson >= 0.59.0
BuildRequires: pkgconfig
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(xwayland)
BuildRequires: pkgconfig(freerdp2)
BuildRequires: pkgconfig(gbm) >= 17.1.0
BuildRequires: pkgconfig(glesv2)
BuildRequires: pkgconfig(hwdata)
BuildRequires: ffmpeg-%{ffmpeg_ver}-libavcodec-devel
BuildRequires: ffmpeg-%{ffmpeg_ver}-libavdevice-devel
BuildRequires: ffmpeg-%{ffmpeg_ver}-libavfilter-devel
BuildRequires: ffmpeg-%{ffmpeg_ver}-libavformat-devel
BuildRequires: ffmpeg-%{ffmpeg_ver}-libavutil-devel
BuildRequires: ffmpeg-%{ffmpeg_ver}-libswresample-devel
BuildRequires: ffmpeg-%{ffmpeg_ver}-libswscale-devel
BuildRequires: pkgconfig(libdisplay-info)
BuildRequires: pkgconfig(libdrm) >= 2.4.113
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libinput) >= 1.14.0
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libseat)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libliftoff)
BuildRequires: pkgconfig(pixman-1)
BuildRequires: pkgconfig(vulkan) >= 1.2.182
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-egl)
BuildRequires: pkgconfig(wayland-protocols) >= 1.25
BuildRequires: pkgconfig(wayland-server) >= 1.22
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: xorg-x11-server-wayland
BuildRequires: pkgconfig(x11-xcb)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(xcb-composite)
BuildRequires: pkgconfig(xcb-icccm)
BuildRequires: pkgconfig(xcb-image)
BuildRequires: pkgconfig(xcb-render)
BuildRequires: pkgconfig(xcb-renderutil)
BuildRequires: pkgconfig(xcb-xfixes)
BuildRequires: pkgconfig(xcb-xkb)
BuildRequires: pkgconfig(xcb-errors)
%description
Pluggable, composable modules for building a Wayland compositor.
%package git-devel
Summary: Modular Wayland compositor library
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
%description git-devel
Pluggable, composable modules for building a Wayland compositor.
%package -n %{libname}
Summary: Modular Wayland compositor library
Group: System/Libraries
%description -n %{libname}
Pluggable, composable modules for building a Wayland compositor.
%prep
%autosetup -p1
%build
export CFLAGS="%{optflags} -I/usr/include/wayland -Wno-redundant-decls"
%meson
%meson_build
%install
%meson_install
%check
%if %{with test}
%meson_test
%endif
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files git-devel
%license LICENSE
%doc README.md CONTRIBUTING.md
%{_includedir}/%{wl_ver}/
%{_libdir}/pkgconfig/%{wl_ver}.pc
%files -n %{libname}
%{_libdir}/lib%{wl_ver}.so
%changelog