# Contributor: Tim <timstanleydev@gmail.com>
# Maintainer: John <ebusd@ebusd.eu>
pkgname=ebusd
pkgver=24.1
pkgrel=0
pkgdesc="Daemon for communication with eBUS heating systems"
url="https://github.com/john30/ebusd"
# Upstream only supports these archs.
arch="x86 x86_64 aarch64 armhf armv7"
license="GPL-3.0-only"
makedepends="cmake mosquitto-dev openssl-dev samurai"
source="$pkgname-$pkgver.tar.gz::https://github.com/john30/ebusd/archive/refs/tags/$pkgver.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DBUILD_TESTING=ON
	cmake --build build
}

check() {
	ctest --output-on-failure --test-dir build
}

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

sha512sums="
acf155d36e99db1c9c2ff04eabbfddba8493f2566b6691f609c86af0e42e3cb0594618fd51e874e475cfc7b9c742d1e010099f38e19c21f52c953ebcfb0f2ea2  ebusd-23.3.tar.gz
"
