diff options
author | Daniel Peukert | 2022-09-01 18:24:13 +0200 |
---|---|---|
committer | Daniel Peukert | 2022-09-01 18:24:13 +0200 |
commit | a4098f458ef46f8deeed1e4e24e9c2a1dd01b0c8 (patch) | |
tree | fd842601f63ce1f4f3ae669cd9940cacaea0429a | |
parent | da19d45f4424f69c4e80beae372ca9a74ef8a352 (diff) | |
download | aur-a4098f458ef46f8deeed1e4e24e9c2a1dd01b0c8.tar.gz |
Add electronN-flags.conf support to electron-bin packages
-rw-r--r-- | .SRCINFO | 36 | ||||
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | electron-launcher.sh | 19 |
3 files changed, 56 insertions, 29 deletions
@@ -1,7 +1,7 @@ pkgbase = electron3-bin pkgdesc = Build cross platform desktop apps with web technologies - version 3 - binary version pkgver = 3.1.13 - pkgrel = 5 + pkgrel = 6 url = https://electronjs.org arch = x86_64 arch = i686 @@ -23,21 +23,23 @@ pkgbase = electron3-bin optdepends = xdg-utils: open URLs with desktop's default (xdg-email, xdg-open) provides = electron3 conflicts = electron3 - source_x86_64 = electron3-bin-chromedriver-3.1.13-5-x86_64.zip::https://github.com/electron/electron/releases/download/v3.1.13/chromedriver-v3.1.13-linux-x64.zip - source_x86_64 = electron3-bin-3.1.13-5-x86_64.zip::https://github.com/electron/electron/releases/download/v3.1.13/electron-v3.1.13-linux-x64.zip - sha256sums_x86_64 = aaaa85c1e3b83b0c9c4337e8a8fd46fcae7be3a00c7bb8ca5dc48169c88e34f8 - sha256sums_x86_64 = 33ab34af83bd1063fb1581ad0fed6dc1120b6b5d1dba0a8db3164af3e95d55df - source_i686 = electron3-bin-chromedriver-3.1.13-5-i686.zip::https://github.com/electron/electron/releases/download/v3.1.13/chromedriver-v3.1.13-linux-ia32.zip - source_i686 = electron3-bin-3.1.13-5-i686.zip::https://github.com/electron/electron/releases/download/v3.1.13/electron-v3.1.13-linux-ia32.zip - sha256sums_i686 = 03eea93b7a741c53de4d70a6d0aad817e76077ee607c3e5799ea88f8548b9116 - sha256sums_i686 = 43b046768e6189794097a8e11e81d305a9c3586685b2ac88b3e44a452ecb2012 - source_armv7h = electron3-bin-chromedriver-3.1.13-5-armv7h.zip::https://github.com/electron/electron/releases/download/v3.1.13/chromedriver-v3.1.13-linux-armv7l.zip - source_armv7h = electron3-bin-3.1.13-5-armv7h.zip::https://github.com/electron/electron/releases/download/v3.1.13/electron-v3.1.13-linux-armv7l.zip - sha256sums_armv7h = 65a40ac17514b921565c5735d020dcad19320c08743b8a57ce59e869cb76763e - sha256sums_armv7h = 4a6f2dcb8d6055c15b2fb416a9172da9f1666147ab82a5b8448177112413fadf - source_aarch64 = electron3-bin-chromedriver-3.1.13-5-aarch64.zip::https://github.com/electron/electron/releases/download/v3.1.13/chromedriver-v3.1.13-linux-arm64.zip - source_aarch64 = electron3-bin-3.1.13-5-aarch64.zip::https://github.com/electron/electron/releases/download/v3.1.13/electron-v3.1.13-linux-arm64.zip - sha256sums_aarch64 = e07b521b78bf1b8a798cf182da7d69addd4df14be1ba1b94f6ac2b8def0eb64d - sha256sums_aarch64 = a81f64005de996950219b9da38f0c9299fb519a6f7a7b7c38868cd066c3fec8e + source = electron-launcher.sh + sha512sums = 65ff3a52eb619ebf8d2fee285c86a6c0524a6cb0d521c8c882887f94ef2c701ba8d53b4b96dc3d3571bfe1466c2de766a78749b3320701b4cc67a974c06f382b + source_x86_64 = electron3-bin-chromedriver-3.1.13-6-x86_64.zip::https://github.com/electron/electron/releases/download/v3.1.13/chromedriver-v3.1.13-linux-x64.zip + source_x86_64 = electron3-bin-3.1.13-6-x86_64.zip::https://github.com/electron/electron/releases/download/v3.1.13/electron-v3.1.13-linux-x64.zip + sha512sums_x86_64 = 1e5137ba3ef30b525ef01bb15698d0b07ff3eda983b7ff50d597786c25ebcb6c9d44c601ed62a46539063898b6dfa93a554ddc9332d3c4f50a2528c00a84f7c4 + sha512sums_x86_64 = cef90248a12ef7649c36d52fa57b93cb19ecfaa0d3bcb93607b3d7a625073381a2eed8f4706e9acfc17c098bd7491eba3fafb935213bc9ed89b70188434f7042 + source_i686 = electron3-bin-chromedriver-3.1.13-6-i686.zip::https://github.com/electron/electron/releases/download/v3.1.13/chromedriver-v3.1.13-linux-ia32.zip + source_i686 = electron3-bin-3.1.13-6-i686.zip::https://github.com/electron/electron/releases/download/v3.1.13/electron-v3.1.13-linux-ia32.zip + sha512sums_i686 = fa84973aaa8f87eaecd2008a8f46bac9a75a3f2697df7268c1cdc71a5768ff62e54662d37473057f9f22f33ab9cf213efc0c8503a5a1548f6bcc1c36dd5b52ce + sha512sums_i686 = 4ea041546137fde931c1bd9a4b2d5eccda1977c06841a135c990716b342ba033b348f78f02ac3252f16b06b3413c343b6f259d7a23e17abf8ba3b94715a15071 + source_armv7h = electron3-bin-chromedriver-3.1.13-6-armv7h.zip::https://github.com/electron/electron/releases/download/v3.1.13/chromedriver-v3.1.13-linux-armv7l.zip + source_armv7h = electron3-bin-3.1.13-6-armv7h.zip::https://github.com/electron/electron/releases/download/v3.1.13/electron-v3.1.13-linux-armv7l.zip + sha512sums_armv7h = a0ab580e1353f45c243fc8c8ec8325e62476db6dac9b7ed86327f2f2384577df7fe887290bd1e669ae973a367820140f2f60304d8b8ecd920dc2e5c113603755 + sha512sums_armv7h = d0d3e9e14dfe6a7d2d0c4a5b9051fd9688bb6d69697efc07116883393946c65cc1f1f2dec03b3ce91aff0611ff6def76b8352173e927d8372df033e1010e0553 + source_aarch64 = electron3-bin-chromedriver-3.1.13-6-aarch64.zip::https://github.com/electron/electron/releases/download/v3.1.13/chromedriver-v3.1.13-linux-arm64.zip + source_aarch64 = electron3-bin-3.1.13-6-aarch64.zip::https://github.com/electron/electron/releases/download/v3.1.13/electron-v3.1.13-linux-arm64.zip + sha512sums_aarch64 = 73bd388d6cdde9198071b0cf016d1cfdcac9d47e0f0c962185399fbc1f0b6115f22a31e87c9eedad8a75b2b2f982a215be5e9c818e100ce01c895f4df467b8d5 + sha512sums_aarch64 = c1b96713cd152747b34d97df8bb9a4352a87cae910a54ceba3eb39752a829e80b083aed8c6d6af42639a73fab86dbb7559f5d70869b54c956e1057ec6ad712ec pkgname = electron3-bin @@ -1,10 +1,11 @@ -# Maintainer: Daniel Peukert <dan.peukert@gmail.com> +# Maintainer: Daniel Peukert <daniel@peukert.cc> +# Contributor: Nicola Squartini <tensor5@gmail.com> (electron-launcher.sh script) # Contributor: Matthew McGinn <mamcgi@gmail.com> _projectname='electron' _pkgname="${_projectname}3" pkgname="$_pkgname-bin" pkgver='3.1.13' -pkgrel='5' +pkgrel='6' pkgdesc='Build cross platform desktop apps with web technologies - version 3 - binary version' arch=('x86_64' 'i686' 'armv7h' 'aarch64') url="https://${_projectname}js.org" @@ -34,14 +35,20 @@ source_aarch64=( "$pkgname-chromedriver-$pkgver-$pkgrel-aarch64.zip::$_releaseurl/chromedriver-v$pkgver-linux-arm64.zip" "$pkgname-$pkgver-$pkgrel-aarch64.zip::$_releaseurl/$_projectname-v$pkgver-linux-arm64.zip" ) -sha256sums_x86_64=('aaaa85c1e3b83b0c9c4337e8a8fd46fcae7be3a00c7bb8ca5dc48169c88e34f8' - '33ab34af83bd1063fb1581ad0fed6dc1120b6b5d1dba0a8db3164af3e95d55df') -sha256sums_i686=('03eea93b7a741c53de4d70a6d0aad817e76077ee607c3e5799ea88f8548b9116' - '43b046768e6189794097a8e11e81d305a9c3586685b2ac88b3e44a452ecb2012') -sha256sums_armv7h=('65a40ac17514b921565c5735d020dcad19320c08743b8a57ce59e869cb76763e' - '4a6f2dcb8d6055c15b2fb416a9172da9f1666147ab82a5b8448177112413fadf') -sha256sums_aarch64=('e07b521b78bf1b8a798cf182da7d69addd4df14be1ba1b94f6ac2b8def0eb64d' - 'a81f64005de996950219b9da38f0c9299fb519a6f7a7b7c38868cd066c3fec8e') +source=('electron-launcher.sh') +sha512sums=('65ff3a52eb619ebf8d2fee285c86a6c0524a6cb0d521c8c882887f94ef2c701ba8d53b4b96dc3d3571bfe1466c2de766a78749b3320701b4cc67a974c06f382b') +sha512sums_x86_64=('1e5137ba3ef30b525ef01bb15698d0b07ff3eda983b7ff50d597786c25ebcb6c9d44c601ed62a46539063898b6dfa93a554ddc9332d3c4f50a2528c00a84f7c4' + 'cef90248a12ef7649c36d52fa57b93cb19ecfaa0d3bcb93607b3d7a625073381a2eed8f4706e9acfc17c098bd7491eba3fafb935213bc9ed89b70188434f7042') +sha512sums_i686=('fa84973aaa8f87eaecd2008a8f46bac9a75a3f2697df7268c1cdc71a5768ff62e54662d37473057f9f22f33ab9cf213efc0c8503a5a1548f6bcc1c36dd5b52ce' + '4ea041546137fde931c1bd9a4b2d5eccda1977c06841a135c990716b342ba033b348f78f02ac3252f16b06b3413c343b6f259d7a23e17abf8ba3b94715a15071') +sha512sums_armv7h=('a0ab580e1353f45c243fc8c8ec8325e62476db6dac9b7ed86327f2f2384577df7fe887290bd1e669ae973a367820140f2f60304d8b8ecd920dc2e5c113603755' + 'd0d3e9e14dfe6a7d2d0c4a5b9051fd9688bb6d69697efc07116883393946c65cc1f1f2dec03b3ce91aff0611ff6def76b8352173e927d8372df033e1010e0553') +sha512sums_aarch64=('73bd388d6cdde9198071b0cf016d1cfdcac9d47e0f0c962185399fbc1f0b6115f22a31e87c9eedad8a75b2b2f982a215be5e9c818e100ce01c895f4df467b8d5' + 'c1b96713cd152747b34d97df8bb9a4352a87cae910a54ceba3eb39752a829e80b083aed8c6d6af42639a73fab86dbb7559f5d70869b54c956e1057ec6ad712ec') + +prepare() { + sed -i -e "s/%%PKGNAME%%/$_pkgname/g" -e "s/%%PROJECTNAME%%/$_projectname/g" "$srcdir/electron-launcher.sh" +} package() { cd "$srcdir/" @@ -52,8 +59,7 @@ package() { cp -r --no-preserve=ownership --preserve=mode "$_folder/" "$pkgdir/usr/lib/$_pkgname/$_folder/" done - install -dm755 "$pkgdir/usr/bin" - ln -nfs "/usr/lib/$_pkgname/$_projectname" "$pkgdir/usr/bin/$_pkgname" + install -Dm755 'electron-launcher.sh' "$pkgdir/usr/bin/$_pkgname" for _license in 'LICENSE' 'LICENSES.chromium.html'; do install -Dm644 "$_license" "$pkgdir/usr/share/licenses/$pkgname/$_license" diff --git a/electron-launcher.sh b/electron-launcher.sh new file mode 100644 index 000000000000..d2c5449c4bea --- /dev/null +++ b/electron-launcher.sh @@ -0,0 +1,19 @@ +#!/usr/bin/bash + +set -euo pipefail + +flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/%%PKGNAME%%-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/%%PKGNAME%%/%%PROJECTNAME%% "${flags[@]}" "$@" |