diff --git a/modem/qrtr/0001-meson-Specify-project-and-library-version.patch b/modem/qrtr/0001-meson-Specify-project-and-library-version.patch new file mode 100644 index 000000000..720a33e8e --- /dev/null +++ b/modem/qrtr/0001-meson-Specify-project-and-library-version.patch @@ -0,0 +1,53 @@ +From 4990bead3e1dc8c98921e773d3d74fbcc3919715 Mon Sep 17 00:00:00 2001 +From: Alexey Minnekhanov +Date: Sun, 28 Apr 2024 18:41:42 +0300 +Subject: [PATCH] meson: Specify project and library version + +Specify project version in meson project() call. +Withouth this in generated qrtr.pc pkg-config file +version will be undefined, and this is a packaging error. +E.g. Alpine Linux's build system doesn't allow this to pass. + +Specify also shared library soversion. +This reults in library being called libqrtr.so.1.1 and +symlinks generated and installed as: + + libqrtr.so -> libqrtr.so.1 + libqrtr.so.1 -> libqrtr.so.1.1 + +This is important for -dev subpackage. + +Signed-off-by: Alexey Minnekhanov +--- + lib/meson.build | 3 ++- + meson.build | 1 + + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/meson.build b/lib/meson.build +index 7a894b3..d60d2f5 100644 +--- a/lib/meson.build ++++ b/lib/meson.build +@@ -6,6 +6,7 @@ libqrtr_srcs = ['logging.c', 'qmi.c', 'qrtr.c'] + libqrtr = shared_library('qrtr', + libqrtr_srcs, + include_directories : inc, +- install: true) ++ install : true, ++ version : meson.project_version()) + + pkg.generate(libqrtr) +diff --git a/meson.build b/meson.build +index 4478263..c378761 100644 +--- a/meson.build ++++ b/meson.build +@@ -3,6 +3,7 @@ + project('qrtr', + 'c', + license : [ 'BSD-3-Clause'], ++ version : '1.1', + default_options : [ + 'warning_level=1', + 'buildtype=release', +-- +2.43.2 + diff --git a/modem/qrtr/APKBUILD b/modem/qrtr/APKBUILD index 30f905dac..9ec104dd2 100644 --- a/modem/qrtr/APKBUILD +++ b/modem/qrtr/APKBUILD @@ -1,34 +1,34 @@ # Maintainer: Minecrell pkgname=qrtr -pkgver=0.3_git20201207 -_commit="9dc7a88548c27983e06465d3fbba2ba27d4bc050" -pkgrel=1 +pkgver=1.1 +pkgrel=0 pkgdesc="Userspace reference for net/qrtr in the Linux kernel" -url="https://github.com/andersson/qrtr" +url="https://github.com/linux-msm/qrtr" arch="all" license="BSD-3-Clause" depends_dev="linux-headers" -makedepends="$depends_dev" -subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-openrc $pkgname-pmtest" +makedepends="$depends_dev meson" +subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-pmtest" source=" - qrtr-$_commit.tar.gz::https://github.com/andersson/qrtr/archive/$_commit.tar.gz - qrtr-ns.initd + qrtr-$pkgver.tar.gz::https://github.com/linux-msm/qrtr/archive/refs/tags/v$pkgver.tar.gz + 0001-meson-Specify-project-and-library-version.patch lookup-test.files lookup-test.sh " -builddir="$srcdir/qrtr-$_commit" options="!check" build() { - make prefix=/usr all + abuild-meson \ + -Dqrtr-ns=disabled \ + -Dsystemd-service=disabled \ + . output + meson compile -C output } package() { - make prefix=/usr DESTDIR="$pkgdir" install - rm -r "$pkgdir"/usr/lib/systemd + DESTDIR="$pkgdir" meson install --no-rebuild -C output install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/COPYING - install -Dm755 "$srcdir"/qrtr-ns.initd "$pkgdir"/etc/init.d/qrtr-ns } pmtest() { @@ -42,8 +42,8 @@ pmtest() { } sha512sums=" -d3dd93983382a105372665dd1e1abb944adace37fabab0980dec3dded175586e37dc0da480d21be5876921274f4420bdf032bd5cc0e86ab951e3ec704ec396e0 qrtr-9dc7a88548c27983e06465d3fbba2ba27d4bc050.tar.gz -68c27e5c1c70ffdec0498cd4746208dd571e392ba030cf1a52f4a05394a57e399cf7437a1f27631dd288c7771fb656946aa27d7aec5b23d41fe13c5199ae390a qrtr-ns.initd +68cc8731d500b2e7f5702471a3c239f415bd97035678d972d40d28ceb58bcaa1ee271816fd2002776a2d370611fc9e5e54a79d1a16ce2bce258b9411d9aec824 qrtr-1.1.tar.gz +9209bdc7d06bc231f191230b88bbb666edee82ad03da95bcc00d29ac47144f89f0430f5c649820f6cece4edcdb1991d1bfb94a5d59bb12ca415968797e956c76 0001-meson-Specify-project-and-library-version.patch 00b26c284b2765ddc46cf4b9eb4013e09ae96dfa4a9ac1c49f608a735579bbb442cda2a116417131c5dec234aca224bac824a2167f280990a04c90bc3065a51d lookup-test.files 6daecca1be580176cc275a07e87086151fe2426a4f032264a305a5deb49d888acd29e05e6efbabb1693cd5ebdfb62a7543138d2149c9a1154d1451b3d854dfdc lookup-test.sh " diff --git a/modem/qrtr/qrtr-ns.initd b/modem/qrtr/qrtr-ns.initd deleted file mode 100644 index f95b4e029..000000000 --- a/modem/qrtr/qrtr-ns.initd +++ /dev/null @@ -1,9 +0,0 @@ -#!/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"