From 585222a865d7f3b2624d3e75d86c04f4b2dfb9f5 Mon Sep 17 00:00:00 2001 From: Clayton Craft <clayton@craftyguy.net> Date: Wed, 25 Sep 2024 13:30:25 -0700 Subject: [PATCH] device-purism-librem5: create openrc subpackage (MR 5635) --- device/main/device-purism-librem5/APKBUILD | 21 +++++++++++++++---- ...device-purism-librem5-openrc.post-install} | 0 .../device-purism-librem5-openrc.post-upgrade | 1 + ...ism-librem5-smartcard-openrc.post-install} | 0 .../device-purism-librem5.post-upgrade | 1 - 5 files changed, 18 insertions(+), 5 deletions(-) rename device/main/device-purism-librem5/{device-purism-librem5.post-install => device-purism-librem5-openrc.post-install} (100%) create mode 120000 device/main/device-purism-librem5/device-purism-librem5-openrc.post-upgrade rename device/main/device-purism-librem5/{device-purism-librem5-smartcard.post-install => device-purism-librem5-smartcard-openrc.post-install} (100%) delete mode 120000 device/main/device-purism-librem5/device-purism-librem5.post-upgrade diff --git a/device/main/device-purism-librem5/APKBUILD b/device/main/device-purism-librem5/APKBUILD index f4c312dade9..f9f0bae9d31 100644 --- a/device/main/device-purism-librem5/APKBUILD +++ b/device/main/device-purism-librem5/APKBUILD @@ -4,7 +4,7 @@ # Contributor: Clayton Craft <clayton@craftyguy.net> pkgname=device-purism-librem5 pkgver=4 -pkgrel=0 +pkgrel=1 _confver=64 _purismrel=1 # <librem5-base ver>.<purism release> @@ -56,14 +56,15 @@ subpackages=" $pkgname-gnome $pkgname-nonfree-firmware:nonfree_firmware $pkgname-pulseaudio + $pkgname-openrc $pkgname-smartcard + $pkgname-smartcard-openrc:smartcard_openrc $pkgname-tinydm $pkgname-usbguard $pkgname-x11 " # TODO: remove "replaces" when upstream ucm has proper L5 support... replaces="alsa-ucm-conf" -install="$pkgname.post-install $pkgname.post-upgrade" builddir="$srcdir/librem5-base-pureos-$_purismver" @@ -105,15 +106,27 @@ tinydm() { "$subpkgdir"/etc/tinydm.d/env-wayland.d/70-librem5-xwayland-accel.sh } +openrc() { + install_if="$pkgname=$pkgver-r$pkgrel openrc" + install="$subpkgname.post-install $subpkgname.post-upgrade" + + mkdir -p "$subpkgdir" +} + smartcard() { pkgdesc="OpenPGP SmartCard support for the Librem 5" depends="$pkgname ccid gnupg-scdaemon pcsc-lite pcsc-tools" install_if="$pkgname pcsc-tools" - install="$install $subpkgname.post-install" + + mkdir -p "$subpkgdir" +} + +smartcard_openrc() { + install_if="$pkgname-smartcard=$pkgver-r$pkgrel openrc" + install="$subpkgname.post-install" install -D -m644 "$srcdir"/pcscd-librem5-reader.conf \ "$subpkgdir"/etc/reader.conf.d/librem5-ttxs-reader - install -D -m755 "$srcdir"/pcscd-librem5.initd \ "$subpkgdir"/etc/init.d/pcscd-librem5 } diff --git a/device/main/device-purism-librem5/device-purism-librem5.post-install b/device/main/device-purism-librem5/device-purism-librem5-openrc.post-install similarity index 100% rename from device/main/device-purism-librem5/device-purism-librem5.post-install rename to device/main/device-purism-librem5/device-purism-librem5-openrc.post-install diff --git a/device/main/device-purism-librem5/device-purism-librem5-openrc.post-upgrade b/device/main/device-purism-librem5/device-purism-librem5-openrc.post-upgrade new file mode 120000 index 00000000000..c5805520507 --- /dev/null +++ b/device/main/device-purism-librem5/device-purism-librem5-openrc.post-upgrade @@ -0,0 +1 @@ +device-purism-librem5-openrc.post-install \ No newline at end of file diff --git a/device/main/device-purism-librem5/device-purism-librem5-smartcard.post-install b/device/main/device-purism-librem5/device-purism-librem5-smartcard-openrc.post-install similarity index 100% rename from device/main/device-purism-librem5/device-purism-librem5-smartcard.post-install rename to device/main/device-purism-librem5/device-purism-librem5-smartcard-openrc.post-install diff --git a/device/main/device-purism-librem5/device-purism-librem5.post-upgrade b/device/main/device-purism-librem5/device-purism-librem5.post-upgrade deleted file mode 120000 index fc80e9fe176..00000000000 --- a/device/main/device-purism-librem5/device-purism-librem5.post-upgrade +++ /dev/null @@ -1 +0,0 @@ -device-purism-librem5.post-install \ No newline at end of file -- GitLab