aboutsummaryrefslogtreecommitdiff
path: root/misc/balena-etcher-bin/balena-etcher-bin.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/balena-etcher-bin/balena-etcher-bin.SlackBuild')
-rw-r--r--misc/balena-etcher-bin/balena-etcher-bin.SlackBuild57
1 files changed, 22 insertions, 35 deletions
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"