PKGBUILDs/community/kitty/PKGBUILD

66 lines
2.6 KiB
Bash
Raw Normal View History

2018-07-12 00:20:44 +00:00
# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
2018-12-06 13:36:03 +00:00
# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
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>
# - patch to remove lto from hardcoded cflags
2019-09-22 00:55:44 +00:00
pkgbase=kitty
pkgname=(kitty kitty-terminfo)
2020-06-21 01:41:00 +00:00
pkgver=0.18.0
2020-03-24 12:15:56 +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"
license=('GPL3')
2019-07-29 12:36:16 +00:00
depends=('python3' 'freetype2' 'fontconfig' 'wayland' 'libx11' 'libxkbcommon-x11' 'libxi' 'hicolor-icon-theme' 'libgl' 'libcanberra')
2019-07-05 19:52:44 +00:00
makedepends=('libxinerama' 'libxcursor' 'libxrandr' 'wayland-protocols' 'python-sphinx')
2018-07-12 00:20:44 +00:00
optdepends=('imagemagick: viewing images with icat')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/kovidgoyal/$pkgname/archive/v$pkgver.tar.gz"
'0001-remove-lto.patch')
2020-06-21 01:41:00 +00:00
sha512sums=('4d09765a6044ffb9af34afdd49f0c2445f9d39a69a0f835b1cea8f4c288dc93af2b12d40b752eaf29abdc5e13b5d6de77ce7edec20a5e396f158526d749cc962'
2020-03-24 12:15:56 +00:00
'1c0290a42552cbe5b3bb120965bcd2dc20b9236dba43e43ff086adc14dc25417323bf9b750bf1cb06ecb65267d6d479f79daf14f64eac697c06a138fa7baa601')
2018-07-12 00:20:44 +00:00
prepare() {
cd "$srcdir/$pkgname-$pkgver"
patch -p1 -i ../0001-remove-lto.patch
}
build() {
cd "$srcdir/$pkgname-$pkgver"
2019-07-05 19:52:44 +00:00
python3 setup.py linux-package --update-check-interval=0
2018-07-12 00:20:44 +00:00
}
2019-09-22 00:55:44 +00:00
package_kitty() {
depends+=('kitty-terminfo')
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
python __main__.py + complete setup bash | install -Dm644 /dev/stdin "${pkgdir}"/usr/share/bash-completion/completions/kitty
python __main__.py + complete setup fish | install -Dm644 /dev/stdin "${pkgdir}"/usr/share/fish/vendor_completions.d/kitty.fish
# doesn't know how to http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Autoloaded-files
# so we write our own header
{
echo "#compdef kitty"
python __main__.py + complete setup zsh
} | install -Dm644 /dev/stdin "${pkgdir}"/usr/share/zsh/site-functions/_kitty
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
2020-02-23 17:19:44 +00:00
install -Dm644 docs/generated/conf/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
}