From e72235b9812557c8e313b2d49a8bdd21abfda843 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 20 Apr 2021 18:36:03 +0200 Subject: [PATCH] Ports: Add launchers for some of the ports --- Ports/.port_include.sh | 31 ++++++++++++++++++++++++++++++- Ports/SDLPoP/package.sh | 4 ++++ Ports/Super-Mario/package.sh | 4 ++++ Ports/cmatrix/package.sh | 4 ++++ Ports/doom/package.sh | 3 +++ Ports/hatari/package.sh | 7 +++---- Ports/nyancat/package.sh | 3 +++ Ports/quake/package.sh | 3 +++ Ports/vitetris/package.sh | 3 +++ 9 files changed, 57 insertions(+), 5 deletions(-) diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index aac65135b7..29651d2f3f 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -68,6 +68,9 @@ shift : "${auth_type:=md5}" : "${auth_import_key:=}" : "${auth_opts:=}" +: "${launcher_name:=}" +: "${launcher_category:=}" +: "${launcher_command:=}" run_nocd() { echo "+ $@ (nocd)" @@ -77,9 +80,34 @@ run() { echo "+ $@" (cd "$workdir" && "$@") } -run_replace_in_file(){ +run_replace_in_file() { run perl -p -i -e "$1" $2 } +install_launcher() { + if [ -z "$launcher_name" ] || [ -z "${launcher_category}" ] || [ -z "${launcher_command}" ]; then + return + fi + script_name="${launcher_name,,}" + script_name="${script_name// /}" + mkdir -p $DESTDIR/usr/local/libexec + cat >$DESTDIR/usr/local/libexec/$script_name <