aboutsummaryrefslogtreecommitdiff
path: root/network/qutebrowser-tox/qutebrowser-tox.SlackBuild
diff options
context:
space:
mode:
authorAlexander Verbovetsky <alik@ejik.org>2019-11-02 12:56:24 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-11-02 12:56:24 +0700
commitfa1bafe69d6e3d4116c675a79c16e98cd099a4c6 (patch)
treed4f9e680c04935b7548fd4278adfa899c5d1f2ec /network/qutebrowser-tox/qutebrowser-tox.SlackBuild
parentedd3d508c2714a6ce9c2e5f7c6ded3aa735816e5 (diff)
network/qutebrowser-tox: Added (keyboard-driven vim-like browser).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/qutebrowser-tox/qutebrowser-tox.SlackBuild')
-rw-r--r--network/qutebrowser-tox/qutebrowser-tox.SlackBuild153
1 files changed, 153 insertions, 0 deletions
diff --git a/network/qutebrowser-tox/qutebrowser-tox.SlackBuild b/network/qutebrowser-tox/qutebrowser-tox.SlackBuild
new file mode 100644
index 0000000000000..d811b4133aa57
--- /dev/null
+++ b/network/qutebrowser-tox/qutebrowser-tox.SlackBuild
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+# Slackware build script for qutebrowser-tox
+
+# Copyright 2019, Alexander Verbovetsky, Moscow, Russia
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=qutebrowser-tox
+VERSION=${VERSION:-1.8.1}
+SSLVERSION=${SSLVERSION:-1.1.1d}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" != "x86_64" ]; then
+ echo "Only x86_64 is supported."
+ exit 1
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/opt $OUTPUT
+cd $PKG/opt
+tar xvf $CWD/qutebrowser-$VERSION.tar.gz
+mv qutebrowser-$VERSION qutebrowser
+cd qutebrowser
+sed -i "/\[testenv:mkvenv-pypi\]/ a \
+install_command = pip install --no-index --find-links $CWD/ {opts} {packages}"\
+ tox.ini
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+tox -e mkvenv-pypi
+
+find ./ -type f -name '*.pyc' -delete
+find ./ -type d -name '__pycache__' -delete
+find ./ -type f -exec sed -i -e "s|$PKG||" {} \;
+sed -i "/\[testenv:mkvenv-pypi\]/ {n;d;}" tox.ini
+find ./ -type f -exec sed -i -e \
+ '1,2 s|^#!/usr/bin/env python.*$|#!/opt/qutebrowser/.venv/bin/python3|' {} \;
+.venv/bin/python3 -m compileall scripts/__init__.py \
+ scripts/setupcommon.py scripts/utils.py -fq
+.venv/bin/python3 -m compileall .venv/lib -fq
+
+.venv/bin/python3 scripts/asciidoc2html.py
+a2x -f manpage doc/qutebrowser.1.asciidoc
+gzip -9 doc/qutebrowser.1
+mkdir -p $PKG/usr/man/man1
+mv doc/qutebrowser.1.gz $PKG/usr/man/man1
+
+mkdir -p $PKG/usr/share/{metainfo,applications,icons/hicolor/scalable/apps,pixmaps,qutebrowser/pdf.js}
+install -m 0644 misc/org.qutebrowser.qutebrowser.appdata.xml \
+ $PKG/usr/share/metainfo/
+install -m 0644 misc/org.qutebrowser.qutebrowser.desktop \
+ $PKG/usr/share/applications
+for res in 16 24 32 48 64 96 128 256 512; do
+ mkdir -p $PKG/usr/share/icons/hicolor/${res}x${res}/apps/;
+ install -m 0644 "icons/qutebrowser-${res}x${res}.png" \
+"$PKG/usr/share/icons/hicolor/${res}x${res}/apps/qutebrowser.png"
+done
+install -m 0644 "icons/qutebrowser.svg" \
+ $PKG/usr/share/icons/hicolor/scalable/apps/
+install -m 0644 "icons/qutebrowser.xpm" $PKG/usr/share/pixmaps/
+
+cp -a misc/userscripts $PKG/usr/share/qutebrowser
+cp -a scripts $PKG/usr/share/qutebrowser
+rm -rf $PKG/usr/share/qutebrowser/scripts/{__pycache__,dev,testbrowser,__init__.py,asciidoc2html.py,setupcommon.py,link_pyqt.py}
+
+mkdir -p $PKG/usr/bin
+install -m 0755 -o root -g root $CWD/wrapper.qutebrowser \
+ $PKG/usr/bin/qutebrowser
+
+find ./ -type f -exec sed -i -e \
+ 's|/usr/share/pdf.js|/usr/share/qutebrowser/pdf.js|' {} \;
+cd $PKG/usr/share/qutebrowser/pdf.js
+unzip $CWD/pdfjs-*-dist.zip
+chown -R root:root $PKG/usr/share/qutebrowser/pdf.js
+find ./ -type f -exec chmod 644 {} \;
+
+cd $TMP
+rm -rf openssl-$SSLVERSION
+tar xvf $CWD/openssl-$SSLVERSION.tar.gz
+cd openssl-$SSLVERSION
+./config \
+ zlib \
+ enable-camellia \
+ enable-seed \
+ enable-rfc3779 \
+ enable-cms \
+ enable-md2 \
+ enable-rc5 \
+ enable-ssl3 \
+ enable-ssl3-method \
+ no-weak-ssl-ciphers \
+ no-mdc2 \
+ no-ec2m \
+ no-idea \
+ no-sse2 \
+ shared
+
+make
+
+mv libcrypto.so.1.1 libssl.so.1.1 $PKG/opt/qutebrowser
+cd $PKG/opt/qutebrowser
+
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README.asciidoc $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}