pkgname=qrtr
pkgver=0.3_git20200302
_commit="7bd5cf302437755b0d741c9dc1805395a9654597"
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-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="054d75190d110b3daa397bcc1c954a2361bd1024b81055e94ea257a4d79f0bc4e789dd7c33f5b649e4fec82480ef0ff6c78a64aaee1c9ff97f30dd4ba9bc1dc8  qrtr-7bd5cf302437755b0d741c9dc1805395a9654597.tar.gz
68c27e5c1c70ffdec0498cd4746208dd571e392ba030cf1a52f4a05394a57e399cf7437a1f27631dd288c7771fb656946aa27d7aec5b23d41fe13c5199ae390a  qrtr-ns.initd"
