From f55c9c0d3af699ac2906949f71e26d9c620cc91f Mon Sep 17 00:00:00 2001
From: Aster Boese <asterboese@mailbox.org>
Date: Mon, 30 Sep 2024 17:46:03 -0400
Subject: [PATCH] xiaomi-scorpio: move openrc scripts to subpackage (MR 5688)

---
 device/community/device-xiaomi-scorpio/APKBUILD        | 10 ++++++++--
 ...iaomi-scorpio-nonfree-firmware-openrc.post-install} |  0
 2 files changed, 8 insertions(+), 2 deletions(-)
 rename device/community/device-xiaomi-scorpio/{device-xiaomi-scorpio-nonfree-firmware.post-install => device-xiaomi-scorpio-nonfree-firmware-openrc.post-install} (100%)

diff --git a/device/community/device-xiaomi-scorpio/APKBUILD b/device/community/device-xiaomi-scorpio/APKBUILD
index 389a0bc5988..bc20d44ddaf 100644
--- a/device/community/device-xiaomi-scorpio/APKBUILD
+++ b/device/community/device-xiaomi-scorpio/APKBUILD
@@ -4,7 +4,7 @@
 pkgname=device-xiaomi-scorpio
 pkgdesc="Xiaomi Mi Note 2"
 pkgver=3
-pkgrel=14
+pkgrel=15
 url="https://postmarketos.org"
 license="MIT"
 arch="aarch64"
@@ -23,6 +23,7 @@ makedepends="devicepkg-dev"
 subpackages="
 	$pkgname-phosh
 	$pkgname-nonfree-firmware:nonfree_firmware
+	$pkgname-nonfree-firmware-openrc:nonfree_firmware_openrc
 	"
 
 source="
@@ -56,13 +57,18 @@ nonfree_firmware() {
 		linux-firmware-qca
 		soc-qcom-msm8996-nonfree-firmware
 		"
-	install="$subpkgname.post-install"
 	mkdir "$subpkgdir"
 
 	install -Dm644 "$srcdir/30-gpu-firmware.files" -t \
 		"$subpkgdir/usr/share/mkinitfs/files"
 }
 
+nonfree_firmware_openrc() {
+	install_if="$pkgname-nonfree-firmware=$pkgver-r$pkgrel openrc"
+	install="$subpkgname.post-install"
+	mkdir "$subpkgdir"
+}
+
 phosh() {
 	install_if="$pkgname=$pkgver-r$pkgrel phosh"
 	install -Dm644 "$srcdir"/phoc.ini \
diff --git a/device/community/device-xiaomi-scorpio/device-xiaomi-scorpio-nonfree-firmware.post-install b/device/community/device-xiaomi-scorpio/device-xiaomi-scorpio-nonfree-firmware-openrc.post-install
similarity index 100%
rename from device/community/device-xiaomi-scorpio/device-xiaomi-scorpio-nonfree-firmware.post-install
rename to device/community/device-xiaomi-scorpio/device-xiaomi-scorpio-nonfree-firmware-openrc.post-install
-- 
GitLab