summaryrefslogtreecommitdiff
path: root/network/vivaldi/vivaldi.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/vivaldi/vivaldi.SlackBuild')
-rw-r--r--network/vivaldi/vivaldi.SlackBuild42
1 files changed, 15 insertions, 27 deletions
diff --git a/network/vivaldi/vivaldi.SlackBuild b/network/vivaldi/vivaldi.SlackBuild
index 65386fd648..0c8ea8803a 100644
--- a/network/vivaldi/vivaldi.SlackBuild
+++ b/network/vivaldi/vivaldi.SlackBuild
@@ -1,8 +1,9 @@
#!/bin/sh
#
-# Slackware build script for Vivaldi.
+# Slackware build script for vivaldi.
#
# Copyright 2015-2017 Edinaldo P. Silva, Rio de Janeiro, Brazil.
+# Copyright 2017, Alexander Verbovetsky, Moscow, Russia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +24,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=vivaldi
-VERSION=${VERSION:-1.10.867.48}
+VERSION=${VERSION:-1.11.917.39}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -35,42 +36,25 @@ if [ -z "$ARCH" ]; then
esac
fi
+case "$ARCH" in
+ i?86) BITS="i386" ;;
+ x86_64) BITS="amd64" ;;
+ *) echo "$ARCH is not supported."
+ exit 1 ;;
+esac
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
- BITS="i386"
- echo "This package is currently only available for 64bit."
- exit 1
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
- BITS="i386"
- echo "This package is currently only available for 64bit."
- exit 1
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
- BITS="amd64"
-else
- echo "Package for $(uname -m) architecture is not available."
- exit 1
-fi
-
-SRCNAM=$PRGNAM-stable
-SRCVER=$VERSION-1
-
set -e
rm -rf $PKG $TMP/$PRGNAM
mkdir -p $TMP/$PRGNAM $PKG $OUTPUT
cd $TMP/$PRGNAM
-ar p $CWD/${SRCNAM}_${SRCVER}_${BITS}.deb data.tar.xz | tar xvJ
+ar p $CWD/${PRGNAM}-stable_${VERSION}-*_${BITS}.deb data.tar.xz | tar xvJ
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -81,6 +65,10 @@ find -L . \
rm -r opt/vivaldi/cron
mv opt usr $PKG/
+[ "${CUSTOM_CSS:-no}" != "no" ] && \
+ sed -i 's/^\([\ ]*<link.*\)common\(\.css.*\)$/\1common\2\n\1custom\2/' \
+ $PKG/opt/vivaldi/resources/vivaldi/browser.html
+
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