summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD25
-rwxr-xr-xbalena-etcher-electron.sh4
3 files changed, 28 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7b7b28a65fdf..d95ecc736093 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = balena-etcher
pkgdesc = Flash OS images to SD cards & USB drives, safely and easily
- pkgver = 1.7.8
+ pkgver = 1.18.14
pkgrel = 1
epoch = 2
url = https://balena.io/etcher
@@ -9,13 +9,10 @@ pkgbase = balena-etcher
arch = armv7h
arch = aarch64
license = Apache
- makedepends = npm
- makedepends = python2
makedepends = git
- makedepends = jq
- makedepends = patch
- makedepends = nodejs<17
- depends = electron12
+ makedepends = python
+ makedepends = nvm
+ depends = electron25
depends = gtk3
depends = libxtst
depends = libxss
@@ -29,11 +26,11 @@ pkgbase = balena-etcher
conflicts = etcher-git
conflicts = etcher-bin
options = !strip
- source = etcher::git+https://github.com/balena-io/etcher.git#tag=v1.7.8
+ source = etcher::git+https://github.com/balena-io/etcher.git#tag=v1.18.14
source = balena-etcher-electron.sh
source = balena-etcher-electron.desktop
sha256sums = SKIP
- sha256sums = 13651534055dd72dd622ff8ac3d56ee818008dfa1f680b5c4ad7f7ef14698800
+ sha256sums = 280d47d714974b30ca706b12fc3f4bf059c4b19aee87d84778009653003fb41e
sha256sums = c950d9578f9cf60998c920bb60c6617559963f06a4918e7072fdc706b0ef5754
pkgname = balena-etcher
diff --git a/PKGBUILD b/PKGBUILD
index 00a0c65960d4..ebfa4e6cf5e9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=balena-etcher
_pkgname=etcher
-pkgver=1.7.8
+pkgver=1.18.14
pkgrel=1
epoch=2
pkgdesc='Flash OS images to SD cards & USB drives, safely and easily'
@@ -12,8 +12,8 @@ arch=('x86_64' 'i686' 'armv7h' 'aarch64')
_github_url='https://github.com/balena-io/etcher'
url='https://balena.io/etcher'
license=(Apache)
-depends=("electron12" "gtk3" "libxtst" "libxss" "nss" "alsa-lib" "glib2" "polkit" "libusb")
-makedepends=("npm" "python2" "git" "jq" "patch" "nodejs<17")
+depends=("electron25" "gtk3" "libxtst" "libxss" "nss" "alsa-lib" "glib2" "polkit" "libusb")
+makedepends=("git" "python" "nvm")
optdepends=("libnotify: for notifications")
conflicts=("${_pkgname}"
"${_pkgname}-git"
@@ -25,18 +25,33 @@ source=("etcher::git+https://github.com/balena-io/${_pkgname}.git#tag=v${pkgver}
"${pkgname}-electron.desktop"
)
sha256sums=('SKIP'
- '13651534055dd72dd622ff8ac3d56ee818008dfa1f680b5c4ad7f7ef14698800'
+ '280d47d714974b30ca706b12fc3f4bf059c4b19aee87d84778009653003fb41e'
'c950d9578f9cf60998c920bb60c6617559963f06a4918e7072fdc706b0ef5754')
+_ensure_local_nvm() {
+ # let's be sure we are starting clean
+ which nvm >/dev/null 2>&1 && nvm deactivate && nvm unload
+ export NVM_DIR="${srcdir}/.nvm"
+
+ # The init script returns 3 if version specified
+ # in ./.nvrc is not (yet) installed in $NVM_DIR
+ # but nvm itself still gets loaded ok
+ source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
+}
+
prepare() {
cd "${_pkgname}"
git submodule init
git submodule update || cd "${srcdir}/${_pkgname}/scripts/resin" && git checkout --
+ _ensure_local_nvm
+ nvm install 16
}
build() {
+ unset MAKEFLAGS # unset MAKEFLAGS to avoid some error
+ _ensure_local_nvm
cd "${_pkgname}"
- make electron-develop
+ npm ci --openssl_fips=""
npm run webpack
npm prune --production
}
diff --git a/balena-etcher-electron.sh b/balena-etcher-electron.sh
index 78aa2ece41c3..52e3a27ea83e 100755
--- a/balena-etcher-electron.sh
+++ b/balena-etcher-electron.sh
@@ -1,6 +1,6 @@
#!/bin/bash
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
- exec electron12 /usr/lib/balena-etcher "$@"
+ exec electron25 /usr/lib/balena-etcher "$@"
else
- exec electron12 --no-sandbox /usr/lib/balena-etcher "$@"
+ exec electron25 --no-sandbox /usr/lib/balena-etcher "$@"
fi