Name:           hyprland
Version:        0.24.1
Release:        %autorelease
Summary:        Dynamic tiling Wayland compositor that doesn't sacrifice on its looks

License:        BSD-3-Clause
URL:            https://hyprland.org/
Source:         https://github.com/hyprwm/Hyprland/releases/download/v%{version}/source-v%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  git
BuildRequires:  glslang
BuildRequires:  jq
BuildRequires:  meson
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(gbm)
BuildRequires:  pkgconfig(glesv2)
BuildRequires:  pkgconfig(hwdata)
BuildRequires:  pkgconfig(libdisplay-info)
BuildRequires:  pkgconfig(libinput)
BuildRequires:  pkgconfig(libliftoff)
BuildRequires:  pkgconfig(libliftoff)
BuildRequires:  pkgconfig(libseat)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(pixman-1)
BuildRequires:  pkgconfig(vulkan)
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  pkgconfig(wayland-scanner)
BuildRequires:  pkgconfig(wayland-server)
BuildRequires:  pkgconfig(xcb-ewmh)
BuildRequires:  pkgconfig(xcb-renderutil)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  pkgconfig(xwayland)

Recommends:     kitty

Requires:       xorg-x11-server-Xwayland
Requires:       cairo

%package devel
Summary:       Static library and header files for the bundled wlroots
Conflicts:     wlroots-devel

%description
Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks.
It supports multiple layouts, fancy effects, has a very flexible IPC model allowing for a lot of customization, and more.

%description devel
Static library and header files for the bundled wlroots

%prep
%autosetup -n %{name}-source

%build
%meson -DLEGACY_RENDERER:BOOL=true -Dwlroots:xcb-errors=disabled
%meson_build

%install
%meson_install

%files
%{_bindir}/Hyprland
%{_bindir}/hyprctl
%{_mandir}/man1/hyprctl.1.gz
%{_mandir}/man1/Hyprland.1.gz
%{_datadir}/hyprland
%{_datadir}/protocols/hyprland-global-shortcuts-v1.xml
%{_datadir}/wayland-sessions/hyprland.desktop


%files devel
%{_includedir}/wlr
%{_datadir}/protocols/hyprland-toplevel-export-v1.xml
%{_datadir}/pkgconfig/hyprland-protocols.pc
%{_libdir}/pkgconfig/wlroots.pc
%{_libdir}/libwlroots.a

%changelog
* Fri Apr 14 2023 Justin Zobel <justin@1707.io> - 0.24.1-1
- Initial Package