modem/qrtr: cleanup (!1032)

- Fix version
- Rename init script to qrtr-ns ("nameservice") to clarify which
  service is actually started
- Use supervise-daemon
- Configure and start daemon in one command (no need for qrtr-cfg)
- Remove "before qcom_rmtfs": it should depend on qrtr-ns,
  not the other way around
- Do not activate qrtr daemon by default - this should happen automatically
  if other service files have "need qrtr-ns"
This commit is contained in:
Minecrell 2020-03-06 19:48:03 +01:00 committed by Bart Ribbers
parent 03ec114637
commit a5eb030452
No known key found for this signature in database
GPG key ID: 699D16185DAFAE61
4 changed files with 16 additions and 20 deletions

View file

@ -1,5 +1,5 @@
pkgname=qrtr pkgname=qrtr
pkgver=1.1.0.3_git20200302 pkgver=0.3_git20200302
_commit="7bd5cf302437755b0d741c9dc1805395a9654597" _commit="7bd5cf302437755b0d741c9dc1805395a9654597"
pkgrel=0 pkgrel=0
pkgdesc="Userspace reference for net/qrtr in the Linux kernel" pkgdesc="Userspace reference for net/qrtr in the Linux kernel"
@ -8,11 +8,10 @@ arch="all"
license="BSD-3-Clause" license="BSD-3-Clause"
depends_dev="linux-headers" depends_dev="linux-headers"
makedepends="$depends_dev" makedepends="$depends_dev"
install="$pkgname.post-install" subpackages="$pkgname-doc $pkgname-dev $pkgname-openrc"
subpackages="$pkgname-doc $pkgname-dev"
source=" source="
qrtr-$_commit.tar.gz::https://github.com/andersson/qrtr/archive/$_commit.tar.gz qrtr-$_commit.tar.gz::https://github.com/andersson/qrtr/archive/$_commit.tar.gz
qrtr.initd qrtr-ns.initd
" "
builddir="$srcdir/qrtr-$_commit" builddir="$srcdir/qrtr-$_commit"
options="!check" options="!check"
@ -23,9 +22,11 @@ build() {
package() { package() {
make prefix=/usr DESTDIR="$pkgdir" install make prefix=/usr DESTDIR="$pkgdir" install
rm -r "$pkgdir"/usr/lib/systemd
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/COPYING install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/COPYING
install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname" install -Dm755 "$srcdir"/qrtr-ns.initd "$pkgdir"/etc/init.d/qrtr-ns
} }
sha512sums="054d75190d110b3daa397bcc1c954a2361bd1024b81055e94ea257a4d79f0bc4e789dd7c33f5b649e4fec82480ef0ff6c78a64aaee1c9ff97f30dd4ba9bc1dc8 qrtr-7bd5cf302437755b0d741c9dc1805395a9654597.tar.gz sha512sums="054d75190d110b3daa397bcc1c954a2361bd1024b81055e94ea257a4d79f0bc4e789dd7c33f5b649e4fec82480ef0ff6c78a64aaee1c9ff97f30dd4ba9bc1dc8 qrtr-7bd5cf302437755b0d741c9dc1805395a9654597.tar.gz
fcd9b8e4c4df9236ec778f1ffb231e547e0d65c718e0caf351bee821b1549aecafbfdb21b4c1d1e3d049d541d87b6bf98746414e88e5d70d05131e0496e1ef37 qrtr.initd" 68c27e5c1c70ffdec0498cd4746208dd571e392ba030cf1a52f4a05394a57e399cf7437a1f27631dd288c7771fb656946aa27d7aec5b23d41fe13c5199ae390a qrtr-ns.initd"

9
modem/qrtr/qrtr-ns.initd Normal file
View file

@ -0,0 +1,9 @@
#!/sbin/openrc-run
supervisor=supervise-daemon
name="QRTR"
description="Qualcomm IPC router name service"
# -f should be in command_args_foreground, but then the order is wrong (1 -f)
command="/usr/bin/qrtr-ns"
command_args="-f 1"

View file

@ -1,11 +0,0 @@
#!/sbin/runscript
depend() {
before qcom_rmtfs
}
start() {
ebegin "Starting QRTR service"
/usr/bin/qrtr-cfg 1 && /usr/bin/qrtr-ns
eend $?
}

View file

@ -1,3 +0,0 @@
#!/bin/sh
rc-update -q add qrtr boot