From: teldra <teldra@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] electron24: add launcher
Date: Mon, 22 May 2023 19:26:35 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44033@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1398 bytes --]
There is a new pull request by teldra against master on the void-packages repository
https://github.com/teldra/void-packages add-configfile-to-electron
https://github.com/void-linux/void-packages/pull/44033
electron24: add launcher
Felt inspired by https://wiki.archlinux.org/title/wayland#Configuration_file to add this functionality to this package.
The config file must be `${XDG_CONFIG_HOME}/${pkgname}-flags.conf` or `~/.config/${pkgname}-flags.conf`.
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/44033.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-add-configfile-to-electron-44033.patch --]
[-- Type: text/x-diff, Size: 1814 bytes --]
From ad2f56df515becbab19482346da7f8d806a3eab5 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Sun, 21 May 2023 22:33:14 +0200
Subject: [PATCH] electron24: add launcher
---
srcpkgs/electron24/files/electron-launcher.sh | 20 +++++++++++++++++++
srcpkgs/electron24/template | 6 +++---
2 files changed, 23 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/electron24/files/electron-launcher.sh
diff --git a/srcpkgs/electron24/files/electron-launcher.sh b/srcpkgs/electron24/files/electron-launcher.sh
new file mode 100644
index 000000000000..ccb91012fbaf
--- /dev/null
+++ b/srcpkgs/electron24/files/electron-launcher.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/bash
+
+set -euo pipefail
+
+name=@ELECTRON@
+flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/${name}-flags.conf"
+
+declare -a flags
+
+if [[ -f "${flags_file}" ]]; then
+ mapfile -t < "${flags_file}"
+fi
+
+for line in "${MAPFILE[@]}"; do
+ if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
+ flags+=("${line}")
+ fi
+done
+
+exec /usr/lib/${name}/electron "${flags[@]}" "$@"
diff --git a/srcpkgs/electron24/template b/srcpkgs/electron24/template
index bdaa56adc8a6..ca4b8cca8feb 100644
--- a/srcpkgs/electron24/template
+++ b/srcpkgs/electron24/template
@@ -1,7 +1,7 @@
# Template file for 'electron24'
pkgname=electron24
version=24.3.0
-revision=1
+revision=2
_nodever=18.14.0
_chromiumver=112.0.5615.165
archs="x86_64* aarch64*"
@@ -436,6 +436,6 @@ do_install() {
vlicense ${wrksrc}/src/electron/LICENSE electron.LICENSE
vlicense ${wrksrc}/src/third_party/electron_node/LICENSE node.LICENSE
- vmkdir /usr/bin
- ln -s ../lib/$pkgname/electron "$DESTDIR"/usr/bin/$pkgname
+ vbin "${FILESDIR}"/electron-launcher.sh "${pkgname}"
+ sed -i "s/@ELECTRON@/${pkgname}/" ${DESTDIR}/usr/bin/${pkgname}
}
next reply other threads:[~2023-05-22 17:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 17:26 teldra [this message]
2023-08-21 1:44 ` github-actions
2023-09-04 1:45 ` [PR PATCH] [Closed]: " github-actions
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44033@inbox.vuxu.org \
--to=teldra@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).