PKGBUILDs/extra/kitty/PKGBUILD

78 lines
3.5 KiB
Bash
Raw Normal View History

2024-08-21 10:28:13 +00:00
# Maintainer: Campbell Jones <serebit at archlinux dot org>
# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Maxim Baz <archlinux at maximbaz dot com>
2023-04-22 13:39:32 +00:00
# Contributor: Sven-Hendrik Haase <svenstaro@archlinux.org>
2018-07-12 00:20:44 +00:00
# Contributor: Fabio 'Lolix' Loli <lolix@disroot.org> -> https://github.com/FabioLolix
# Contributor: Maximilian Kindshofer <maximilian@kindshofer.net>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2020-10-05 01:11:29 +00:00
# - run setup.py with --disable-link-time-optimization
2023-05-16 19:09:42 +00:00
# - bypass false gcc array bounds error with -Wno-error=array-bounds
2018-07-12 00:20:44 +00:00
2019-09-22 00:55:44 +00:00
pkgbase=kitty
2022-01-10 15:22:53 +00:00
pkgname=(kitty kitty-terminfo kitty-shell-integration)
2024-09-06 17:42:51 +00:00
pkgver=0.36.2
2024-06-01 03:18:52 +00:00
pkgrel=1
2019-09-22 00:55:44 +00:00
pkgdesc="A modern, hackable, featureful, OpenGL-based terminal emulator"
2018-07-12 00:20:44 +00:00
arch=('x86_64')
url="https://github.com/kovidgoyal/kitty"
2024-05-27 23:53:25 +00:00
license=('GPL-3.0-only')
2024-03-15 00:19:26 +00:00
depends=('python3' 'freetype2' 'fontconfig' 'wayland' 'libx11' 'libxkbcommon-x11' 'libxcursor' 'libxi'
2023-10-23 23:12:50 +00:00
'hicolor-icon-theme' 'libgl' 'dbus' 'lcms2' 'librsync' 'xxhash')
2024-08-21 10:28:13 +00:00
makedepends=('libxinerama' 'libxrandr' 'wayland-protocols' 'go' 'simde' 'ttf-nerd-fonts-symbols-mono')
2024-05-27 23:53:25 +00:00
options=("!lto")
2021-05-06 19:59:45 +00:00
source=("${pkgname}-${pkgver}.tar.xz::https://github.com/kovidgoyal/${pkgbase}/releases/download/v${pkgver}/${pkgbase}-${pkgver}.tar.xz"
"${pkgname}-${pkgver}.tar.xz.sig::https://github.com/kovidgoyal/${pkgbase}/releases/download/v${pkgver}/${pkgbase}-${pkgver}.tar.xz.sig")
2024-09-06 17:42:51 +00:00
b2sums=('ab7896c9b5f4a3b428a880663f000618cafff5e1837df693d56b0c7c5364aa7acfb8dd472886935594ecff05be30821c68e2fdc598a530ee36c55031956c2998'
2023-11-12 19:28:05 +00:00
'SKIP')
2021-05-06 19:59:45 +00:00
validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal
2018-07-12 00:20:44 +00:00
build() {
cd "$srcdir/$pkgname-$pkgver"
2023-05-16 19:09:42 +00:00
CFLAGS+=" -Wno-error=array-bounds"
2023-09-04 23:59:52 +00:00
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"
2020-10-05 01:11:29 +00:00
python3 setup.py linux-package --update-check-interval=0 --disable-link-time-optimization
2018-07-12 00:20:44 +00:00
}
2019-09-22 00:55:44 +00:00
package_kitty() {
2022-01-10 15:22:53 +00:00
depends+=('kitty-terminfo' 'kitty-shell-integration')
2021-07-15 23:35:03 +00:00
optdepends=('imagemagick: viewing images with icat'
2022-05-02 13:19:01 +00:00
'python-pygments: syntax highlighting in kitty +kitten diff'
2021-07-15 23:35:03 +00:00
'libcanberra: playing "bell" sound on terminal bell')
2019-09-22 00:55:44 +00:00
2018-07-12 00:20:44 +00:00
cd "$srcdir/$pkgname-$pkgver"
2019-07-05 19:52:44 +00:00
cp -r linux-package "${pkgdir}"/usr
2018-07-12 00:20:44 +00:00
2019-07-05 19:52:44 +00:00
# completions
2023-10-23 23:12:50 +00:00
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
2019-07-05 19:52:44 +00:00
install -Dm644 "${pkgdir}"/usr/share/icons/hicolor/256x256/apps/kitty.png "${pkgdir}"/usr/share/pixmaps/kitty.png
2019-09-22 00:55:44 +00:00
rm -r "$pkgdir"/usr/share/terminfo
2022-01-10 15:22:53 +00:00
rm -r "$pkgdir"/usr/lib/kitty/shell-integration
2020-02-23 17:19:44 +00:00
2021-05-06 19:59:45 +00:00
install -Dm644 docs/_build/html/_downloads/*/kitty.conf "${pkgdir}"/usr/share/doc/${pkgname}/kitty.conf
2019-09-22 00:55:44 +00:00
}
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
2018-07-12 00:20:44 +00:00
}
2022-01-10 15:22:53 +00:00
package_kitty-shell-integration() {
pkgdesc='Shell integration scripts for kitty, an OpenGL-based terminal emulator'
mkdir -p "$pkgdir/usr/lib/kitty/"
cp -r "$srcdir/$pkgbase-$pkgver/shell-integration" "$pkgdir/usr/lib/kitty/"
}