# Contributor: Tim <timstanleydev@gmail.com>
# Maintainer: Tim <timstanleydev@gmail.com>
pkgname=ebusd
pkgver=23.2
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="argp-standalone 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="
ac19a39f8ddc00792bde4891020022cad46597da54bec71d56a954239b01dd8e8ea79fcb4cce130fc991beb2f4bff01ae7abd95150fcf9e93d65d7b5b93482ce  ebusd-23.2.tar.gz
"
