%if 0%{!?mkrel:1}
%define mkrel(c) %{1}%{?dist}
%endif

Name:           hyprwayland-scanner
Version:        0.4.4
Release:        %mkrel 1
Summary:        A Hyprland implementation of wayland-scanner, in and for C++
Group:          System/Libraries
License:        BSD-3-Clause
URL:            https://github.com/hyprwm/hyprwayland-scanner
Source0:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0:         hyprwayland-scanner-0.4.2-format-fix.diff

BuildRequires:  cmake
BuildRequires:  cmake(pugixml)
BuildRequires:  gcc-c++ >= 8
BuildRequires:  pkgconfig(fmt)


%description
A Hyprland implementation of wayland-scanner, in and for C++.

%package        devel
Summary:        A Hyprland implementation of wayland-scanner, in and for C++
Group:          Development/C++

%description    devel
A Hyprland implementation of wayland-scanner, in and for C++.

%prep
%autosetup -p1

%build
%cmake
%cmake_build

%install
%cmake_install

%files devel
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/cmake/%{name}/