File wlmaker.spec of Package wlmaker

#
# spec file for package wlmaker
#
# Copyright (c) 2025 Shawn W Dunn <sfalken@opensuse.org>
#
# 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/
#

# libbase is a utility library from the same upstream that is only used
# by this project and is statically linked into the build
%global libbase_commit c2e88af4ac6e2a02359648e3353d4ef161d91974
%global libbase_url https://github.com/phkaeser/libbase

Name:           wlmaker
Version:        0.5
Release:        0
Summary:        Wayland compositor inspired by WindowMaker
License:        Apache-2.0
URL:            https://github.com/phkaeser/wlmaker
Source0:        %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1:        %{libbase_url}/archive/%{libbase_commit}/libbase-%{libbase_commit}.tar.gz

BuildRequires:  clang
BuildRequires:  cmake
BuildRequires:  bison
BuildRequires:  doxygen
BuildRequires:  flex
BuildRequires:  gcc
BuildRequires:  ghostscript-fonts
BuildRequires:  ghostscript-fonts-std
BuildRequires:  graphviz
BuildRequires:  graphviz-gd
BuildRequires:  pkgconfig
BuildRequires:  plantuml

BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(gdlib)
BuildRequires:  pkgconfig(ncurses)
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  pkgconfig(wlroots-0.18)
BuildRequires:  pkgconfig(xwayland)


%description
A Wayland compositor inspired by Window Maker

Key features:
  - Compositor for windows in stacking mode
  - Supports multiple workspaces
  - Appearance inspired by Window Maker, following the look and feel of
    NeXTSTEP
  - Easy to use, lightweight, low gimmicks and fast
  - Dock and clip, to be extended for dockable apps

%prep
%autosetup -p1 -b 1

# Drop bundled dependencies
rm -r dependencies

# Ensure libbase can be found; we move instead of symlinking because the
# build uses relative paths for the includes and that confuses things
rm -r submodules/libbase
mv ../libbase-%{libbase_commit}/ submodules/libbase

# Do not abort on warnings
sed -i 's/-Werror//' CMakeLists.txt submodules/libbase/CMakeLists.txt

# Use Firefox instead of google-chrome
sed -i 's/google-chrome/firefox/' src/dock.c

%build
%cmake -Dconfig_OPTIM=ON
%cmake_build doc

%install
%cmake_install doc

%check
%ctest

%files
%license LICENSE
%dir %{_datadir}/icons/%{name}
%dir %{_datadir}/%{name}
%{_bindir}/%{name}
%{_bindir}/wlmclock
%{_datadir}/icons/%{name}/*.png
%{_datadir}/%{name}/*.plist
%{_datadir}/*.desktop


%changelog

openSUSE Build Service is sponsored by