diff options
Diffstat (limited to 'development/electron/electron.SlackBuild')
-rw-r--r-- | development/electron/electron.SlackBuild | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/development/electron/electron.SlackBuild b/development/electron/electron.SlackBuild index 7eca2a8239..4fdae7c433 100644 --- a/development/electron/electron.SlackBuild +++ b/development/electron/electron.SlackBuild @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for electron # Copyright 2017 Dhaby Xiloj <slack.dhabyx@gmail.com> +# Copyright 2022-2023 Isaac Yu <isaacyu@protonmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +23,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=electron -VERSION=${VERSION:-1.4.16} +VERSION=${VERSION:-20.3.12} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,16 +39,16 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - PKG_ARCH="ia32" -elif [ "$ARCH" = "i686" ]; then - PKG_ARCH="ia32" -elif [ "$ARCH" = "x86_64" ]; then +if [ "$ARCH" = "x86_64" ]; then PKG_ARCH="x64" else echo "The package for $(uname -m) architecture is not supported."; @@ -60,7 +64,6 @@ rm -rf $PRGNAM-$VERSION mkdir $PRGNAM-$VERSION cd $PRGNAM-$VERSION unzip $CWD/$PRGNAM-v$VERSION-linux-$PKG_ARCH.zip -tar xvf $CWD/node-v$VERSION.tar.gz chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -77,28 +80,26 @@ cp -a *.bin *.pak *.so $PRGNAM icudtl.dat version locales resources \ ( cd $PKG/usr/bin ln -sf ../share/$PRGNAM/$PRGNAM ${PRGNAM}${VERSION} - ln -sf ../share/$PRGNAM/$PRGNAM ${PRGNAM} ) -# Install node headers -mkdir -p $PKG/usr/share/$PRGNAM/node -cp -a node-v$VERSION/* $PKG/usr/share/$PRGNAM/node +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 # Install prebuilt version for build binary apps if [ "${INSTALL_ZIP:-no}" != no ]; then mkdir -p $PKG/usr/share/$PRGNAM/release cp $CWD/$PRGNAM-v$VERSION-linux-$PKG_ARCH.zip $PKG/usr/share/$PRGNAM/release - cp $CWD/SHASUMS256.txt $PKG/usr/share/$PRGNAM/release fi mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - LICENSE LICENSES.chromium.html $CWD/README.Slackware \ + LICENSE LICENSES.chromium.html \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README.Slackware > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |