#!/usr/bin/env bash
name='hyprland'
release='3'
version='0.52.2'
url='https://github.com/hyprwm/hyprland'
description="Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks."
email='aliriza.keskin@pardus.org.tr'
maintainer='aliriza'
license=('GPLv3')
source=("https://github.com/hyprwm/Hyprland/releases/download/v$version/source-v$version.tar.gz")
depends=(hyprcursor libXcursor libglvnd libinput libxcb libxcb libxkbcommon mesa pango util-linux xcb-util-errors xcb-util-wm hyprgraphics re2)
makedepends=(glaze)
sha256sums=('57b4db99896cad8388482b945b119b206fd7ea94638793b550210be08274d7dd')
group=(hyprland.wm)
uses=()
arch=('x86_64')

cd hyprland-source

setup () {
    meson setup build \
      --prefix=/usr \
     -Dsystemd=disabled
}

build () {
    ninja -C build $jobs
}

package () {
    ninja -C build install $jobs
    # fix absolute path symlink
    rm -f $DESTDIR/usr/bin/hyprland
    ln -s Hyprland $DESTDIR/usr/bin/hyprland
}

