aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/balena-etcher-bin/README2
-rw-r--r--misc/balena-etcher-bin/balena-etcher-bin.SlackBuild57
-rw-r--r--misc/balena-etcher-bin/balena-etcher-bin.info6
-rw-r--r--misc/balena-etcher-bin/balena-etcher-bin.sh3
4 files changed, 26 insertions, 42 deletions
diff --git a/misc/balena-etcher-bin/README b/misc/balena-etcher-bin/README
index 07493ec77f..bfd0feb136 100644
--- a/misc/balena-etcher-bin/README
+++ b/misc/balena-etcher-bin/README
@@ -1,3 +1 @@
Flash OS images to SD cards & USB drives, safely and easily.
-If you realy need root access start it from cli:
-balena-etcher --no-sandbox
diff --git a/misc/balena-etcher-bin/balena-etcher-bin.SlackBuild b/misc/balena-etcher-bin/balena-etcher-bin.SlackBuild
index ca8add3f3f..994d04dfc1 100644
--- a/misc/balena-etcher-bin/balena-etcher-bin.SlackBuild
+++ b/misc/balena-etcher-bin/balena-etcher-bin.SlackBuild
@@ -25,13 +25,13 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=balena-etcher-bin
-VERSION=${VERSION:-2.1.0}
+VERSION=${VERSION:-2.1.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-SRCNAM64=balenaEtcher-2.1.0-x64
-COMPRESS=AppImage
+SRCNAM64=balena-etcher_2.1.4_amd64
+COMPRESS=deb
if [ -z "$ARCH" ]; then
@@ -135,48 +135,35 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-rm AppRun balenaEtcher.desktop
+mkdir -p $PKG/opt/${PRGNAM%-bin}
+ cp -R $PKG/usr/lib $PKG/opt/${PRGNAM%-bin}/
+ rm -rf $PKG/usr/{lib,bin}
+
+mkdir $PKG/usr/bin
+ cat $CWD/$PRGNAM.sh > $PKG/usr/bin/${PRGNAM%-bin}
+ chmod +x $PKG/usr/bin/${PRGNAM%-bin}
-mkdir -p $PKG/opt
-mkdir -p "$PKG"/usr/doc/$PRGNAM-"$VERSION"
-mv ./usr/lib/${PRGNAM%-bin}/LICENSE* "$PKG"/usr/doc/$PRGNAM-"$VERSION"
-rm ./usr/lib/balenaEtcher || true
-cp -R ./usr/lib/* $PKG/opt
-rm -rf ./usr/bin
mkdir -p $PKG/usr/share/icons/hicolor/256x256/apps/
-cp -R ./usr/share/icons/hicolor/256x256/* $PKG/usr/share/icons/hicolor/256x256/apps/
-chmod 0644 $PKG/usr/share/icons/hicolor/256x256/apps/${PRGNAM%-bin}.png
-
-mkdir -p $PKG/usr/bin
-cat $CWD/$PRGNAM.sh > $PKG/usr/bin/${PRGNAM%-bin}
-chmod +x $PKG/usr/bin/${PRGNAM%-bin}
-
-mkdir -p $PKG/usr/share/applications
-cat << EOF > $PKG/usr/share/applications/${PRGNAM%-bin}.desktop
-[Desktop Entry]
-Version=1.0
-Type=Application
-Name=balenaEtcher
-Comment=Flash OS images to SD cards & USB drives safely and easily
-Exec=balena-etcher %U
-Icon=balena-etcher
-Terminal=false
-Categories=Utility;
-StartupNotify=true
-EOF
+ cp -R $PKG/usr/share/pixmaps/* $PKG/usr/share/icons/hicolor/256x256/apps/
+ chmod 0644 $PKG/usr/share/icons/hicolor/256x256/apps/${PRGNAM%-bin}.png
+
chmod 0644 "$PKG"/usr/share/applications/"${PRGNAM%-bin}".desktop
-# Strip binaries and libraries
+rm -rf $PKG/opt/balena-etcher/lib/balena-etcher/balenaEtcher || true
+
+find $PKG -type f -exec sh -c 'file -b "$1" | grep -q "ELF"' _ {} \; -exec chmod +x {} \;
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find "$PKG"/ -type f -name "*.so*" -exec chmod 755 {} \;
-rm -f "$PKG"/opt/balena-etcher/balenaEtcher || true
-cat "$CWD"/$PRGNAM.SlackBuild > $PKG/usr/doc/"$PRGNAM-$VERSION"/$PRGNAM.SlackBuild
+mkdir -p "$PKG"/usr/doc/$PRGNAM-"$VERSION"
+ cat "$CWD"/$PRGNAM.SlackBuild > $PKG/usr/doc/"$PRGNAM-$VERSION"/$PRGNAM.SlackBuild
+ cp -R $PKG/usr/share/doc $PKG/usr/doc/"$PRGNAM-$VERSION"
+ rm -rf $PKG/usr/share/doc
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
+ cat $CWD/slack-desc > $PKG/install/slack-desc
+ cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg --remove-tmp-rpaths -l y -c n "$OUTPUT"/"$PRGNAM"-"$VERSION"-"$ARCH"-"$BUILD""$TAG"."$PKGTYPE"
diff --git a/misc/balena-etcher-bin/balena-etcher-bin.info b/misc/balena-etcher-bin/balena-etcher-bin.info
index 5eef09f78d..3216258b22 100644
--- a/misc/balena-etcher-bin/balena-etcher-bin.info
+++ b/misc/balena-etcher-bin/balena-etcher-bin.info
@@ -1,10 +1,10 @@
PRGNAM="balena-etcher-bin"
-VERSION="2.1.0"
+VERSION="2.1.4"
HOMEPAGE="https://www.balena.io/etcher/"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
-DOWNLOAD_x86_64="https://github.com/balena-io/etcher/releases/download/v2.1.0/balenaEtcher-2.1.0-x64.AppImage"
-MD5SUM_x86_64="3f18e4c6b16f76cc6e56001679f72d11"
+DOWNLOAD_x86_64="https://github.com/balena-io/etcher/releases/download/v2.1.4/balena-etcher_2.1.4_amd64.deb"
+MD5SUM_x86_64="a6e447ec4d343c1e63d5d031992f2ff0"
REQUIRES=""
MAINTAINER="Ioannis Anagnostakis"
EMAIL="rizitis@gmail.com"
diff --git a/misc/balena-etcher-bin/balena-etcher-bin.sh b/misc/balena-etcher-bin/balena-etcher-bin.sh
index 87c1377b8c..fcb34baeb9 100644
--- a/misc/balena-etcher-bin/balena-etcher-bin.sh
+++ b/misc/balena-etcher-bin/balena-etcher-bin.sh
@@ -1,3 +1,2 @@
#!/bin/bash
-cd /opt/balena-etcher || exit 1
-LD_LIBRARY_PATH=/opt/balena-etcher:$LD_LIBRARY_PATH ./balena-etcher "$@"
+exec /opt/balena-etcher/usr/lib/balena-etcher/balena-etcher