## START: Set by rpmautospec
## (rpmautospec version 0.3.0)
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

Name:           wl-mirror
Version:        0.12.2
Release:        %autorelease
Summary:        Simple Wayland output mirror client

License:        GPLv3
URL:            https://github.com/Ferdi265/%{name}
Source0:        %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  libglvnd-devel
BuildRequires:  scdoc
BuildRequires:  wayland-devel
BuildRequires:  wayland-protocols-devel

# wlr-protocols may have different licenses, but it does not affect
# the generated code or the binary file license
Provides:       bundled(wlr-protocols) = 0^20211229g0c7437e

%description
Simple output mirror client for Wlroots-based compositors.

wl-mirror attempts to provide a solution to sway's lack of output
mirroring by mirroring an output onto a client surface.

%prep
%autosetup
# remove bundled wayland-protocols, just in case
rm -rf proto/wayland-protocols


%build
%cmake \
    -DFORCE_SYSTEM_WL_PROTOCOLS:BOOL=ON \
    -DINSTALL_DOCUMENTATION:BOOL=ON
%cmake_build


%install
%cmake_install


%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*


%changelog
* Thu Oct 06 2022 Aleksei Bavshin <alebastr@fedoraproject.org> 0.12.2-1
- Update to 0.12.2

* Mon Jul 25 2022 Aleksei Bavshin <alebastr@fedoraproject.org> 0.12.1-1
- Update to 0.12.1

* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> 0.11.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Thu Jul 07 2022 Aleksei Bavshin <alebastr@fedoraproject.org> 0.11.2-1
- Initial import (#2095936)