File xwayland-run.spec of Package xwayland-run

#
# spec file for package xwayland-run
#
# Copyright (c) 2024 Neal Gompa
#
# 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/
#


Name:           xwayland-run
Version:        0.0.4
Release:        0
Summary:        Set of utilities to run headless X/Wayland clients

License:        GPL-2.0-or-later
URL:            https://gitlab.freedesktop.org/ofourdan/xwayland-run
Source0:        %{url}/-/archive/%{version}/%{name}-%{version}.tar.gz

# https://gitlab.freedesktop.org/ofourdan/xwayland-run/-/merge_requests/19
Patch0001:      0001-wlheadless-Ignore-os.waitpid-1-0-error.patch

BuildArch:      noarch

BuildRequires:  meson >= 0.60.0
BuildRequires:  git-core
BuildRequires:  python3-devel
Requires:       (weston or cage or kwin6 or kwin5 or mutter or gnome-kiosk)
Requires:       xorg-x11-server-wayland
%if 0%{?suse_version} && 0%{?suse_version} < 1600
Requires:       dbus-1
%else
Requires:       dbus-1-daemon
%endif
Requires:       xauth

# Handle preference for boolean dep on compositor
%if 0%{?sle_version}
Suggests:       mutter
%else
Suggests:       weston
%endif

# Provide names of the other utilities included
Provides:       wlheadless-run = %{version}-%{release}
Provides:       xwfb-run = %{version}-%{release}

%description
xwayland-run contains a set of small utilities revolving around running
Xwayland and various Wayland compositor headless.


%prep
%autosetup -S git


%build
%meson %{?sle_version:-Dcompositor=mutter}
%meson_build


%install
%meson_install


%files
%license COPYING
%doc README.md
%{_bindir}/wlheadless-run
%{_bindir}/xwayland-run
%{_bindir}/xwfb-run
%{_datadir}/wlheadless/
%{_mandir}/man1/wlheadless-run.1*
%{_mandir}/man1/xwayland-run.1*
%{_mandir}/man1/xwfb-run.1*
%{python3_sitelib}/wlheadless/


%changelog
openSUSE Build Service is sponsored by