Subject: [PATCH] community/mmsd: create -tools subpackage

From: Stacy Harper <[email-masked]>
Date: Sat, 17 Jul 2021 11:30:27 +0200

Signed-off-by: Stacy Harper <[email-masked]>
---
 community/mmsd/APKBUILD | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/community/mmsd/APKBUILD b/community/mmsd/APKBUILD
index fe815555d9..dd75aa0144 100644
--- a/community/mmsd/APKBUILD
+++ b/community/mmsd/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Clayton Craft <[email-masked]>
 pkgname=mmsd
 pkgver=0.3
-pkgrel=0
+pkgrel=1
 pkgdesc="daemon for receiving and managing GSM MMS messages"
 url="https://source.puri.sm/kop316/mmsd"
 arch="all !mips !mips64 !s390x" # blocked by modemmanager
@@ -18,6 +18,7 @@ source="
 	mmsd.desktop
 	"
 builddir="$srcdir/$pkgname-v$pkgver"
+subpackages="$pkgname-tools"
 
 build() {
 	abuild-meson . output
@@ -34,5 +35,15 @@ package() {
 		"$pkgdir"/etc/xdg/autostart/mmsd.desktop
 }
 
+tools() {
+	mkdir -p "$subpkgdir"/usr/bin
+	cd "$srcdir/mmsd-v$pkgver"
+
+	install -Dm755 \
+		output/tools/create-hex-array \
+		output/tools/decode-mms \
+		"$subpkgdir"/usr/bin/
+}
+
 sha512sums="4993a060dc839d5bf92b4e44c1264355c3fdfe502a9c654c75747a9944bfad44ef20b99278c8b6cef6b23eebf131faec9f5b19d4e46da0564634695b5b024245  mmsd-v0.3.tar.gz
 1c0d28fd2f0ea4bf6532f84a8747b9cfb7e9361a05888fe911fa546759d5b0b668750d15bbb6b20d7f1e3f7362ca799a8a2eb61aa0a7b36e584756fe4f73e95c  mmsd.desktop"
-- 
2.32.0