110 lines
3.6 KiB
Bash
110 lines
3.6 KiB
Bash
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer: Campbell Jones <serebit at archlinux dot org>
|
|
# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
|
|
# Contributor: Maxim Baz <archlinux at maximbaz dot com>
|
|
# Contributor: Sven-Hendrik Haase <svenstaro@archlinux.org>
|
|
# Contributor: Fabio 'Lolix' Loli <lolix@disroot.org> -> https://github.com/FabioLolix
|
|
# Contributor: Maximilian Kindshofer <maximilian@kindshofer.net>
|
|
|
|
pkgbase=kitty
|
|
pkgname=(kitty kitty-terminfo kitty-shell-integration)
|
|
pkgver=0.39.0
|
|
pkgrel=1
|
|
pkgdesc="A modern, hackable, featureful, OpenGL-based terminal emulator"
|
|
arch=(x86_64 powerpc64le riscv64)
|
|
url="https://github.com/kovidgoyal/kitty"
|
|
license=('GPL-3.0-only')
|
|
depends=(
|
|
'dbus'
|
|
'freetype2'
|
|
'fontconfig'
|
|
'harfbuzz'
|
|
'hicolor-icon-theme'
|
|
'lcms2'
|
|
'libgl'
|
|
'libpng'
|
|
'librsync'
|
|
'libx11'
|
|
'libxcursor'
|
|
'libxkbcommon'
|
|
'libxkbcommon-x11'
|
|
'libxi'
|
|
'openssl'
|
|
'python3'
|
|
'wayland'
|
|
'xxhash'
|
|
'zlib'
|
|
)
|
|
makedepends=(
|
|
'go'
|
|
'libxinerama'
|
|
'libxrandr'
|
|
'simde'
|
|
'ttf-nerd-fonts-symbols-mono'
|
|
'wayland-protocols'
|
|
)
|
|
options=("!lto")
|
|
source=("https://github.com/kovidgoyal/${pkgbase}/releases/download/v${pkgver}/${pkgbase}-${pkgver}.tar.xz"{,.sig})
|
|
b2sums=('bd9bc47e58824e18c9dd61ab83f8322abcd7b296902dde3e4bb66516b7d83991fce45d3f4580cd9cfb26f7f51f427e0f2a47dfbf695e2236b5f7042643c672fc'
|
|
'SKIP')
|
|
validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal
|
|
|
|
build() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
|
export CGO_CFLAGS="${CFLAGS}"
|
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
|
export CGO_LDFLAGS="${LDFLAGS}"
|
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
|
case "${CARCH}" in
|
|
powerpc64)
|
|
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
|
|
;;
|
|
esac
|
|
|
|
python3 setup.py linux-package --update-check-interval=0
|
|
}
|
|
|
|
package_kitty() {
|
|
depends+=('kitty-terminfo' 'kitty-shell-integration')
|
|
optdepends=('imagemagick: viewing images with icat'
|
|
'python-pygments: syntax highlighting in kitty +kitten diff'
|
|
'libcanberra: playing "bell" sound on terminal bell')
|
|
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
|
|
cp -r linux-package "${pkgdir}"/usr
|
|
|
|
# completions
|
|
linux-package/bin/kitten __complete__ setup bash | install -Dm644 /dev/stdin "${pkgdir}"/usr/share/bash-completion/completions/kitty
|
|
linux-package/bin/kitten __complete__ setup fish | install -Dm644 /dev/stdin "${pkgdir}"/usr/share/fish/vendor_completions.d/kitty.fish
|
|
linux-package/bin/kitten __complete__ setup zsh | install -Dm644 /dev/stdin "${pkgdir}"/usr/share/zsh/site-functions/_kitty
|
|
|
|
install -Dm 644 "${pkgdir}"/usr/share/icons/hicolor/256x256/apps/kitty.png "${pkgdir}"/usr/share/pixmaps/kitty.png
|
|
|
|
rm -r "$pkgdir"/usr/share/terminfo
|
|
rm -r "$pkgdir"/usr/lib/kitty/shell-integration
|
|
|
|
install -Dm 644 docs/_build/html/_downloads/*/kitty.conf "${pkgdir}"/usr/share/doc/${pkgname}/kitty.conf
|
|
}
|
|
|
|
package_kitty-terminfo() {
|
|
pkgdesc='Terminfo for kitty, an OpenGL-based terminal emulator'
|
|
depends=('ncurses')
|
|
|
|
mkdir -p "$pkgdir/usr/share/terminfo"
|
|
tic -x -o "$pkgdir/usr/share/terminfo" $pkgbase-$pkgver/terminfo/kitty.terminfo
|
|
}
|
|
|
|
package_kitty-shell-integration() {
|
|
pkgdesc='Shell integration scripts for kitty, an OpenGL-based terminal emulator'
|
|
depends=('python3')
|
|
optdepends+=('bash: Bash completions'
|
|
'zsh: ZSH completions'
|
|
'fish: Fish completions')
|
|
|
|
mkdir -p "$pkgdir/usr/lib/kitty/"
|
|
cp -r "$srcdir/$pkgbase-$pkgver/shell-integration" "$pkgdir/usr/lib/kitty/"
|
|
}
|