diff options
author | Alexander Verbovetsky <alik@ejik.org> | 2022-05-04 15:24:03 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-05-07 13:59:34 +0700 |
commit | 703e0e772a9a17cb2f28a945d6057f0f978b714a (patch) | |
tree | 85b0ac7c2d9ea6a1f7e0d415b840888893b4bde6 /network/qutebrowser-bin | |
parent | 5bd631d21b20eef86743898cb9b4ab27aa7d8537 (diff) |
network/qutebrowser-bin: Added (keyboard-focused browser)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/qutebrowser-bin')
-rw-r--r-- | network/qutebrowser-bin/README | 12 | ||||
-rw-r--r-- | network/qutebrowser-bin/README.SBo | 37 | ||||
-rw-r--r-- | network/qutebrowser-bin/doinst.sh | 9 | ||||
-rw-r--r-- | network/qutebrowser-bin/qutebrowser-bin.SlackBuild | 136 | ||||
-rw-r--r-- | network/qutebrowser-bin/qutebrowser-bin.info | 40 | ||||
-rw-r--r-- | network/qutebrowser-bin/slack-desc | 19 | ||||
-rw-r--r-- | network/qutebrowser-bin/wrapper.qutebrowser | 2 |
7 files changed, 255 insertions, 0 deletions
diff --git a/network/qutebrowser-bin/README b/network/qutebrowser-bin/README new file mode 100644 index 0000000000000..f386ebb9b6d51 --- /dev/null +++ b/network/qutebrowser-bin/README @@ -0,0 +1,12 @@ +Qutebrowser is a keyboard-focused browser with a minimal GUI. It's based +on Python and Qt and free software, licensed under the GPL. + +It was inspired by other browsers/addons like dwb and +Vimperator/Pentadactyl. + +This SlackBuild installs all needed dependencies in a virtual +environment subfolder. This comes with an up-to-date Qt/PyQt including a +pre-compiled QtWebEngine binary, but has a couple of caveats: +* It only works on 64-bit x86 systems. +* It comes with a QtWebEngine compiled without proprietary codec support + (such as h.264). diff --git a/network/qutebrowser-bin/README.SBo b/network/qutebrowser-bin/README.SBo new file mode 100644 index 0000000000000..b097c0de1991c --- /dev/null +++ b/network/qutebrowser-bin/README.SBo @@ -0,0 +1,37 @@ +Qutebrowser crashes +=================== + +If qutebrowser starts to crash, its cache may be corrupt. This often +happens after an upgrade. To remove the cache run: +rm -rf ~/.cache/qutebrowser/ +rm -rf ~/.local/share/qutebrowser/webengine/Application\ Cache/ +rm -rf ~/.local/share/qutebrowser/webengine/GPUCache +rm -rf ~/.local/share/qutebrowser/webengine/Service\ Worker/CacheStorage +rm -rf ~/.local/share/qutebrowser/webengine/Service\ Worker/ScriptCache + +Widevine support +================ + +Widevine DRM support requires libwidevinecdm.so plugin. Qutebrowser +searches for it in the following directories: + +/opt/google/chrome +/usr/lib/chromium +/usr/lib64/chromium +/usr/lib/chromium-browser + +Also the path to libwidevinecdm.so can be passed via qt.args setting: +:set qt.args "['widevine-path=/path/to/libwidevinecdm.so']" + +libwidevinecdm.so can be download at +https://dl.google.com/widevine-cdm/X.X.X.X-linux-x64.zip +and manually put to one of the above directories. The version "X.X.X.X" +to download can be found at +https://dl.google.com/widevine-cdm/versions.txt + +libwidevinecdm.so provided by google-chrome from /extra, Alien Bob's +chromium-widevine-plugin, etc. can be used as well. + +To test the Widevine DRM support, go to +https://shaka-player-demo.appspot.com/demo/ +and play the Sintel video. diff --git a/network/qutebrowser-bin/doinst.sh b/network/qutebrowser-bin/doinst.sh new file mode 100644 index 0000000000000..65c7e2eeb9aa5 --- /dev/null +++ b/network/qutebrowser-bin/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/network/qutebrowser-bin/qutebrowser-bin.SlackBuild b/network/qutebrowser-bin/qutebrowser-bin.SlackBuild new file mode 100644 index 0000000000000..4ef4341ce8382 --- /dev/null +++ b/network/qutebrowser-bin/qutebrowser-bin.SlackBuild @@ -0,0 +1,136 @@ +#!/bin/bash + +# Slackware build script for qutebrowser-bin + +# Copyright 2019-2022, 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. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=qutebrowser-bin +VERSION=${VERSION:-2.5.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +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 + +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} + +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.bak "s|\(run_venv(venv_dir, 'python', '-m', 'pip', 'install',\)|\1 \ +'--no-index', '--find-links=$CWD/',|" scripts/mkvenv.py + +sed -i "/env\['PATH'\] = str(bin_path) + os.pathsep + env\['PATH'\]/d" \ + scripts/asciidoc2html.py + +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 {} \; + +python3 scripts/mkvenv.py --skip-smoke-test + +mv scripts/mkvenv.py.bak scripts/mkvenv.py + +find ./ -type f -name '*.pyc' -delete +find ./ -type d -name '__pycache__' -delete +find ./ -type f -exec sed -i -e "s|$PKG||" {} \; +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 {} \; + +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 +mv $PKG/opt/qutebrowser/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 diff --git a/network/qutebrowser-bin/qutebrowser-bin.info b/network/qutebrowser-bin/qutebrowser-bin.info new file mode 100644 index 0000000000000..1fc632a260b87 --- /dev/null +++ b/network/qutebrowser-bin/qutebrowser-bin.info @@ -0,0 +1,40 @@ +PRGNAM="qutebrowser-bin" +VERSION="2.5.0" +HOMEPAGE="https://qutebrowser.org" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://github.com/qutebrowser/qutebrowser/archive/v2.5.0/qutebrowser-2.5.0.tar.gz \ + https://files.pythonhosted.org/packages/fb/58/9efbfe68482dab9557c49d433a60fff9efd7ed8835f829eba8297c2c124a/setuptools-62.1.0-py3-none-any.whl \ + https://files.pythonhosted.org/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl \ + https://files.pythonhosted.org/packages/36/66/19983d471c702e551a19a7225a92a7c1efadd961f6c650110ed906dd0ed7/PyQt5-5.15.6-cp36-abi3-manylinux1_x86_64.whl \ + https://files.pythonhosted.org/packages/83/d4/241a6a518d0bcf0a9fcdcbad5edfed18d43e884317eab8d5230a2b27e206/PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl \ + https://files.pythonhosted.org/packages/71/f7/52c15afe87e769a5892cbe3da8e38db6dee8fc58ce1fb6091dba975c6202/PyQt5_sip-12.9.1-cp39-cp39-manylinux1_x86_64.whl \ + https://files.pythonhosted.org/packages/a1/45/667e82a0f584be10d785213b04c8ce01ae4d2f63cd23ab6307312c69be89/PyQtWebEngine-5.15.5-cp36-abi3-manylinux1_x86_64.whl \ + https://files.pythonhosted.org/packages/48/62/117c9c96837287b181fce6da481065ddda68b3a8c0fa5f00ea62cc08b877/PyQtWebEngine_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl \ + https://files.pythonhosted.org/packages/27/2e/2d98eba665d3d70f4d0bc8e807bac660be0db66330e990978168c05a51a1/adblock-0.5.2-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl \ + https://files.pythonhosted.org/packages/44/98/5b86278fbbf250d239ae0ecb724f8572af1c91f4a11edf4d36a206189440/colorama-0.4.4-py2.py3-none-any.whl \ + https://files.pythonhosted.org/packages/76/02/af4045156cde8feeefa30cb1c051e10321d4960c418bd52346a497feb302/Jinja2-3.1.1-py3-none-any.whl \ + https://files.pythonhosted.org/packages/df/06/c515c5bc43b90462e753bc768e6798193c6520c9c7eb2054c7466779a9db/MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ + https://files.pythonhosted.org/packages/1d/17/ed4d2df187995561b28f1073df24137cb750e12f9879d291cc8ab67c65d2/Pygments-2.11.2-py3-none-any.whl \ + https://files.pythonhosted.org/packages/12/fc/a4d5a7554e0067677823f7265cb3ae22aed8a238560b5133b58cda252dad/PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl \ + https://files.pythonhosted.org/packages/52/c5/df7953fe6065185af5956265e3b16f13c2826c2b1ba23d43154f3af453bc/zipp-3.7.0-py3-none-any.whl \ + https://github.com/mozilla/pdf.js/releases/download/v2.13.216/pdfjs-2.13.216-dist.zip" +MD5SUM_x86_64="86dc62958e6eb9ca2fd28083c602079b \ + 101d2e2bf9b7682ab90d9a7bd487bdbe \ + f7e1c5e641a4a0eea8379f43bceaa564 \ + 0e637e2d6f117699f41ba163e6a0e73e \ + 038f56bd7af99133f591c7497b64ea17 \ + 022756b2a8744a111f622092ed36dee4 \ + 094f8349af070ad35255184061b6d62a \ + d9fe06e7758913f32dc09324ff9abfdf \ + d45a0ceee0df8ec1a6f62c4697355074 \ + 1dcd07acf2b1875ed09428e1ddf7e028 \ + cae2986094602b6c2d6f4405e8d0eb3b \ + 68a29c49e695e11d59af9e33d7e4cfd4 \ + 9b19b40b048b2897d0af1b6af62f3799 \ + aba0c6954cd00aaf39f3619a0bfce3ae \ + fe228758662bbf708699fe52d0232b3b \ + 172e0f11a156d3f3859d3aad37e3ff38" +REQUIRES="" +MAINTAINER="Alexander Verbovetsky" +EMAIL="alik@ejik.org" diff --git a/network/qutebrowser-bin/slack-desc b/network/qutebrowser-bin/slack-desc new file mode 100644 index 0000000000000..44be0b27b1f00 --- /dev/null +++ b/network/qutebrowser-bin/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +qutebrowser-bin: qutebrowser-bin (keyboard-focused browser) +qutebrowser-bin: +qutebrowser-bin: Qutebrowser is a keyboard-focused browser with a minimal GUI. It's +qutebrowser-bin: based on Python and Qt and free software, licensed under the GPL. +qutebrowser-bin: +qutebrowser-bin: It was inspired by other browsers/addons like dwb and +qutebrowser-bin: Vimperator/Pentadactyl. +qutebrowser-bin: +qutebrowser-bin: This script installs all needed dependencies in a .venv subfolder. +qutebrowser-bin: +qutebrowser-bin: Homepage: https://www.qutebrowser.org diff --git a/network/qutebrowser-bin/wrapper.qutebrowser b/network/qutebrowser-bin/wrapper.qutebrowser new file mode 100644 index 0000000000000..754786748cf42 --- /dev/null +++ b/network/qutebrowser-bin/wrapper.qutebrowser @@ -0,0 +1,2 @@ +#!/bin/bash +setsid /opt/qutebrowser/.venv/bin/python3 -m qutebrowser "$@" |