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

pkgname=libsysstat
pkgver=1.1.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=('5bcaed044081314dfdc9034c496ee02138160ba3d0d49b137a4860b840f4371a80ba5e0b90ae2e021c73102c71f59cdcfc76fb23678e9010f55913ee15461c4c'
            '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
}
