summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson2023-04-28 02:19:37 +0200
committer Willy Sudiarto Raharjo2023-04-29 13:11:39 +0200
commit648169422dd198c70954c22150fcce4cade107dc (patch)
tree34af321d6f916665e5406a190222e9713eec5f42
parent6c48312657e47c6d565da2580f08be909a242d4f (diff)
downloadslackbuilds-648169422dd198c70954c22150fcce4cade107dc.tar.gz
system/kitty-bin: Added (featureful, GPU-based terminal emulator)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/kitty-bin/README21
-rw-r--r--system/kitty-bin/README.aarch6413
-rw-r--r--system/kitty-bin/doinst.sh9
-rw-r--r--system/kitty-bin/kitty-bin.SlackBuild100
-rw-r--r--system/kitty-bin/kitty-bin.info10
-rw-r--r--system/kitty-bin/slack-desc19
6 files changed, 172 insertions, 0 deletions
diff --git a/system/kitty-bin/README b/system/kitty-bin/README
new file mode 100644
index 0000000000..64dc5136a8
--- /dev/null
+++ b/system/kitty-bin/README
@@ -0,0 +1,21 @@
+kitty-bin (fast, featureful, GPU-based terminal emulator)
+
+kitty is a terminal emulator for X11 and Wayland [1], which offloads
+the rendering to the GPU [2] and supports modern terminal features. It
+also supports tiling multiple terminal windows without using an extra
+program like screen or tmux.
+
+This conflicts with system/kitty. Do not install kitty-bin and kitty
+on the same system.
+
+This build packages the official kitty binaries for Linux. If you'd
+rather build from source, you can install system/kitty instead, but be
+aware that kitty-bin will usually be a newer version of kitty.
+
+[1] For Wayland support, it may be necessary to add the following
+ line to ~/.config/kitty/kitty.conf:
+ linux_display_server wayland
+
+[2] Requires hardware-accelerated OpenGL support.
+
+See README.aarch64 if you're using 64-bit ARM.
diff --git a/system/kitty-bin/README.aarch64 b/system/kitty-bin/README.aarch64
new file mode 100644
index 0000000000..ce27325e10
--- /dev/null
+++ b/system/kitty-bin/README.aarch64
@@ -0,0 +1,13 @@
+Although SBo doesn't officially support ARM, and I personally don't
+use ARM at all, it should be possible to build an aarch64 package of
+kitty-bin.
+
+The download URL is:
+
+https://github.com/kovidgoyal/kitty/releases/download/v0.28.1/kitty-0.28.1-arm64.txz
+
+The md5sum is: d0872167ce7609a0c1f8e3041f044722
+
+The script will create a package, but I have no idea if it will
+work. If you try this, please contact me (urchlay@slackware.uk) and
+let me know if it works or not.
diff --git a/system/kitty-bin/doinst.sh b/system/kitty-bin/doinst.sh
new file mode 100644
index 0000000000..3e5691a052
--- /dev/null
+++ b/system/kitty-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 usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/system/kitty-bin/kitty-bin.SlackBuild b/system/kitty-bin/kitty-bin.SlackBuild
new file mode 100644
index 0000000000..f0db65edb5
--- /dev/null
+++ b/system/kitty-bin/kitty-bin.SlackBuild
@@ -0,0 +1,100 @@
+#!/bin/bash
+
+# Slackware build script for kitty-bin
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Notes:
+
+# This exists because building kitty from source requires the latest
+# bleeding-edge google-go-lang, newer than we have in the repo, and
+# because Go is just too fast-moving a target for me. At any given
+# time, it's likely that the latest binaries will work before we're
+# able to build our own. This means kitty-bin will probably be a bit
+# newer version than the regular kitty build.
+
+# Since upstream provides a 64-bit ARM binary bundle, this script can
+# create an aarch64 package. I don't use ARM and haven't tested it.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=kitty-bin
+SRCNAM=kitty
+VERSION=${VERSION:-0.28.1}
+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 [ ! -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
+ SRCARCH=i686
+elif [ "$ARCH" = "i686" ]; then
+ SRCARCH=i686
+elif [ "$ARCH" = "x86_64" ]; then
+ SRCARCH=x86_64
+ LIBDIR=lib64
+elif [ "$ARCH" = "aarch64" ]; then
+ SRCARCH=arm64
+ LIBDIR=lib64
+else
+ echo "ARCH '$ARCH' not supported (only i586, i686, x86_64, aarch64)." 1>&1
+ exit 1
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr $OUTPUT
+cd $PKG/usr
+tar xvf $CWD/$SRCNAM-$VERSION-$SRCARCH.txz
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# Use system shared libs. This works, for now, until upstream starts
+# using newer ones. Removing the rpath isn't strictly necessary for
+# 32-bit or pure 64-bit, but it's needed on multilib.
+rm -rf lib/*.so.*
+patchelf --remove-rpath bin/*
+
+if [ -n "$LIBDIR" ]; then
+ mv lib $LIBDIR
+ ln -s $LIBDIR lib
+fi
+
+# TODO: find out WTF lib/cacert.pem is intended to be used for, and
+# whether or not kitty can find it at runtime. No idea currently.
+
+mv share/man man
+gzip -9 man/man*/*
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+mv share/doc/kitty/* $PKGDOC
+rm -rf share/doc
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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/system/kitty-bin/kitty-bin.info b/system/kitty-bin/kitty-bin.info
new file mode 100644
index 0000000000..4a87affb14
--- /dev/null
+++ b/system/kitty-bin/kitty-bin.info
@@ -0,0 +1,10 @@
+PRGNAM="kitty-bin"
+VERSION="0.28.1"
+HOMEPAGE="https://sw.kovidgoyal.net/kitty/"
+DOWNLOAD="https://github.com/kovidgoyal/kitty/releases/download/v0.28.1/kitty-0.28.1-i686.txz"
+MD5SUM="1b3508e7a856abba8a73f4c86f8dd7f6"
+DOWNLOAD_x86_64="https://github.com/kovidgoyal/kitty/releases/download/v0.28.1/kitty-0.28.1-x86_64.txz"
+MD5SUM_x86_64="cc6df78dbaf2f74bfe7b1a0cb66e0014"
+REQUIRES="librsync"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/system/kitty-bin/slack-desc b/system/kitty-bin/slack-desc
new file mode 100644
index 0000000000..ac33f369ec
--- /dev/null
+++ b/system/kitty-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------------------------------------------------------|
+kitty-bin: kitty-bin (fast, featureful, GPU-based terminal emulator)
+kitty-bin:
+kitty-bin: kitty is a terminal emulator for X11 and Wayland, which offloads the
+kitty-bin: rendering to the GPU and supports modern terminal features. It also
+kitty-bin: supports tiling multiple terminal windows without using an extra
+kitty-bin: program like screen or tmux.
+kitty-bin:
+kitty-bin: This is a repack of the official kitty binary.
+kitty-bin:
+kitty-bin:
+kitty-bin: