[neon/snap-packaging/snapcraft-desktop-integration] /: Prepare core24 support.

Scarlett Moore null at kde.org
Mon Sep 23 13:27:41 BST 2024


Git commit 855b6d8f21bb1f07e02fa444005740207ace8df7 by Scarlett Moore.
Committed on 23/09/2024 at 12:21.
Pushed by scarlettmoore into branch 'master'.

Prepare core24 support.

A  +13   -0    command-chain/Makefile
A  +5    -0    command-chain/desktop-launch
A  +5    -0    command-chain/gpu-2404-wrapper
A  +5    -0    command-chain/hooks-configure-fonts
A  +25   -0    command-chain/run
M  +1    -1    kde-neon-6/Makefile

https://invent.kde.org/neon/snap-packaging/snapcraft-desktop-integration/-/commit/855b6d8f21bb1f07e02fa444005740207ace8df7

diff --git a/command-chain/Makefile b/command-chain/Makefile
new file mode 100644
index 0000000..4ace2fd
--- /dev/null
+++ b/command-chain/Makefile
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+
+BIN_DIR := $(DESTDIR)/snap/command-chain
+GPU_WRAPPER :=
+
+scripts = hooks-configure-fonts desktop-launch run $(GPU_WRAPPER)
+
+*:
+	install -D -m755 "$@" "$(BIN_DIR)"/"$@"
+
+install: $(scripts)
+
+.PHONY: $(scripts)
diff --git a/command-chain/desktop-launch b/command-chain/desktop-launch
new file mode 100644
index 0000000..721ce22
--- /dev/null
+++ b/command-chain/desktop-launch
@@ -0,0 +1,5 @@
+!/bin/bash
+
+set -- "${SNAP}/kf6-core24/command-chain/desktop-launch6" "$@"
+# shellcheck source=/dev/null
+source "${SNAP}/snap/command-chain/run"
diff --git a/command-chain/gpu-2404-wrapper b/command-chain/gpu-2404-wrapper
new file mode 100644
index 0000000..9974666
--- /dev/null
+++ b/command-chain/gpu-2404-wrapper
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+set -- "${SNAP}/gpu-2404/bin/gpu-2404-provider-wrapper" "$@"
+# shellcheck source=/dev/null
+source "${SNAP}/snap/command-chain/run"
diff --git a/command-chain/hooks-configure-fonts b/command-chain/hooks-configure-fonts
new file mode 100644
index 0000000..cc3673f
--- /dev/null
+++ b/command-chain/hooks-configure-fonts
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+set -- "${SNAP}/kf6-/command-chain/hooks-configure-fonts" "$@"
+# shellcheck source=/dev/null
+source "${SNAP}/snap/command-chain/run"
diff --git a/command-chain/run b/command-chain/run
new file mode 100644
index 0000000..f9d2282
--- /dev/null
+++ b/command-chain/run
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+if [ -z "$1" ]; then
+  echo "run <command>"
+  exit 1
+fi
+
+if [ -z "${SNAP}" ]; then
+  echo "Not running inside a snap context: SNAP not declared"
+  exit
+fi
+
+
+if [ ! -f "$1" ]; then
+  echo "Content snap command-chain for $1 not found: ensure slot is connected"
+  exit
+fi
+
+# emulate "exec $@" using "source"
+# have to disable "unused variables" because checkshell doesn't know that $BASH_ARGV0 is $0
+# shellcheck disable=SC2034  # Unused variables left for readability
+BASH_ARGV0=$1
+shift
+# shellcheck source=/dev/null
+source "$0"
diff --git a/kde-neon-6/Makefile b/kde-neon-6/Makefile
index be0c279..10d76e4 100644
--- a/kde-neon-6/Makefile
+++ b/kde-neon-6/Makefile
@@ -7,7 +7,7 @@ BIN_DIR              := $(DESTDIR)/snap/command-chain
 LIB_DIR              := $(DESTDIR)/lib
 DEST_LAUNCHER        := desktop-launch6
 LOCALE_GENERATOR     := locale-gen
-DEST_CONFIGURE_HOOK  := hooks-configure-desktop
+DEST_CONFIGURE_HOOK  := hooks-configure-fonts
 
 build: $(DEST_LAUNCHER) $(DEST_CONFIGURE_HOOK)
 


More information about the Neon-commits mailing list