File labwc.spec of Package labwc

#
# spec file for package labwc
#
# 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/
#


Name:           labwc
Version:        @SERVICE@
Release:        0
Summary:        Openbox alternative for Wayland
License:        GPL-2.0-or-later
Group:          System/GUI/Other
URL:            https://github.com/johanmalm/labwc
Source:         %{name}-%{version}.tar.xz
BuildRequires:  meson
BuildRequires:  ninja
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(libinput) >= 1.14
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(pangocairo)
BuildRequires:  pkgconfig(pixman-1)
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  pkgconfig(wayland-server)
BuildRequires:  pkgconfig(wlroots) >= 0.13.0
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  scdoc
Recommends:     %{name}-lang
Recommends:     xwayland
Requires:       alacritty
Requires:       bemenu
Suggests:       grim
Suggests:       swaybg
Suggests:       waybar

%description
Labwc is a wlroots-based stacking compositor for Wayland.

%lang_package

%prep
%autosetup
sed -i "s/Clearlooks-3.4/%{name}/" docs/rc.xml

%build
%meson \
    -Dman-pages=enabled \
    -Dxwayland=enabled \
    -Dnls=enabled
%meson_build

%install
%meson_install
install -Dm 0644 docs/*.xml -t %{buildroot}%{_sysconfdir}/xdg/%{name}/
install -Dm 0644 docs/themerc -t %{buildroot}%{_datadir}/themes/%{name}/openbox-3/
install -dm 0755 %{buildroot}%{_datadir}/xsessions
cat > %{buildroot}%{_datadir}/xsessions/%{name}.desktop <<-EOF
[Desktop Entry]
Type=XSession
Exec=%{name}
TryExec=%{name}
Name=Labwc
Comment=Openbox alternative for Wayland
EOF

%find_lang %{name}

%files
%doc NEWS.md README.md
%{_bindir}/%{name}
%dir %{_sysconfdir}/xdg/%{name}
%config(noreplace) %{_sysconfdir}/xdg/%{name}/menu.xml
%config(noreplace) %{_sysconfdir}/xdg/%{name}/rc.xml
%dir %{_datadir}/themes
%dir %{_datadir}/themes/%{name}
%dir %{_datadir}/themes/%{name}/openbox-3
%{_datadir}/themes/%{name}/openbox-3/themerc
%dir %{_datadir}/wayland-sessions
%{_datadir}/wayland-sessions/%{name}.desktop
%{_datadir}/xsessions/%{name}.desktop
%{_mandir}/man?/%{name}*.?%{?ext_man}
%{_datadir}/doc/%{name}/
%license LICENSE

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by