# Maintainer: Minecrell <minecrell@minecrell.net>
pkgname=qrtr
pkgver=0.3_git20201110
_commit="cb1a6476e69dcb455f6c0251b8ceca1dd67d368a"
pkgrel=0
pkgdesc="Userspace reference for net/qrtr in the Linux kernel"
url="https://github.com/andersson/qrtr"
arch="all"
license="BSD-3-Clause"
depends_dev="linux-headers"
makedepends="$depends_dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-openrc"
source="
	qrtr-$_commit.tar.gz::https://github.com/andersson/qrtr/archive/$_commit.tar.gz
	qrtr-ns.initd
"
builddir="$srcdir/qrtr-$_commit"
options="!check"

build() {
	make prefix=/usr all
}

package() {
	make prefix=/usr DESTDIR="$pkgdir" install
	rm -r "$pkgdir"/usr/lib/systemd

	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/COPYING
	install -Dm755 "$srcdir"/qrtr-ns.initd "$pkgdir"/etc/init.d/qrtr-ns
}

sha512sums="1aee6b4a4a14ed844113ae27c8dee0b2650531b0f9472aa978784a8ac716db79df3b6cc02d5241963f538e042c11795795b6b9924c24d0e295579f28ce3bc403  qrtr-cb1a6476e69dcb455f6c0251b8ceca1dd67d368a.tar.gz
68c27e5c1c70ffdec0498cd4746208dd571e392ba030cf1a52f4a05394a57e399cf7437a1f27631dd288c7771fb656946aa27d7aec5b23d41fe13c5199ae390a  qrtr-ns.initd"
