# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>
# Contributor: Jerome Leclanche <jerome@leclan.ch>

pkgname=lxqt-session
pkgver=2.3.0
pkgrel=1
pkgdesc="The LXQt session manager"
arch=("x86_64")
groups=("lxqt")
url="https://github.com/lxqt/$pkgname"
license=("LGPL2.1")
depends=("liblxqt" "qtxdg-tools" "xdg-user-dirs"  "libx11" "udev" "kwindowsystem" "libQt6Xdg.so" "procps-ng" "libproc2.so" "layer-shell-qt"
         "ttf-font"
        # Put the default icon theme as a mandatory dependency to improve out-of-box user experience
        # https://github.com/lxqt/lxqt-session/blob/2.3.0/config/lxqt.conf#L3
        # See https://github.com/lxqt/lxqt.github.io/pull/178#issuecomment-3501920534
         "breeze-icons")
makedepends=("cmake" "lxqt-build-tools")
optdepends=(
	"oxygen-icons: Alternative icon theme"
	"sddm: The recommended display manager"
)
source=(
	"https://github.com/lxqt/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"{,.asc}
)
sha256sums=('ce11297a587e09f118f2a5b5decd6829e98dcb0c72b805400bd42bdcb39f728f'
            'SKIP')
validpgpkeys=(
	"169704C6FB490C6892C7F23C37E0AF1FDA48F373"  # Jerome Leclanche <jerome@leclan.ch>
	"7C733BA5F585AAD669E4D23A42C9C8D3AF5EA5E3"  # Alf Gaida <agaida@siduction.org>
	"19DFDF3A579BD509DBB572D8BE793007AD22DF7E"  # Pedram Pourang <tsujan2000@gmail.com>
)

build() {
	cmake -S "$srcdir/$pkgname-$pkgver" -B build \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
