# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>

# Note: There's already collectd-openrc package - a subpackage of collectd with init script.
pkgname=collectd-openrc-plugin
_projname=collectd-openrc
pkgver=0.2.1
pkgrel=1
pkgdesc="Collectd plugin that collects information about APK packages"
url="https://github.com/jirutka/collectd-apk"
arch="all"
license="GPL-2.0-or-later"
depends="collectd>=5.12"
makedepends="
	collectd-dev
	json-c-dev
	openrc-dev
	"
source="https://github.com/jirutka/collectd-openrc/archive/v$pkgver/collectd-openrc-$pkgver.tar.gz"
builddir="$srcdir/$_projname-$pkgver"

build() {
	make
}

check() {
	make check
}

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

sha512sums="
72a14a78757603aa26a8fd1685bb4c0530ca0fc7dca16bb082fae7843ac1df00e730f4604711ad45a8695ec26b62e132578660df506498e46a981ba5ff973b56  collectd-openrc-0.2.1.tar.gz
"
