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

pkgname=libsysstat
pkgver=1.2.0
pkgrel=1
pkgdesc="Library to query system statistics (net, resource usage, ...)"
arch=("x86_64")
url="https://github.com/lxqt/$pkgname"
license=("LGPL2.1")
depends=("qt6-base")
makedepends=("lxqt-build-tools")
source=(
	"https://github.com/lxqt/libsysstat/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"
	"https://github.com/lxqt/libsysstat/releases/download/$pkgver/$pkgname-$pkgver.tar.xz.asc"
)
sha512sums=('93ff787f0ce9f82042dff045d7b7836d8d8c31ddba884547d9890c8fdbd5e335fd4514f502fea3f25bcd2b8cffcedd53e244b8cce68eb1ede2dff6098722d97e'
            'SKIP')
validpgpkeys=(
	"169704C6FB490C6892C7F23C37E0AF1FDA48F373"  # Jerome Leclanche <jerome@leclan.ch>
	"7C733BA5F585AAD669E4D23A42C9C8D3AF5EA5E3"  # Alf Gaida <agaida@siduction.org>
	"19DFDF3A579BD509DBB572D8BE793007AD22DF7E"  # Pedram Pourang <tsujan2000@gmail.com>
)

build() {
	mkdir -p build
	cd build
	cmake "$srcdir/$pkgname-$pkgver" \
		-DCMAKE_INSTALL_PREFIX=/usr
	make
}

package() {
	cd build
	make DESTDIR="$pkgdir" install
}
