Initial commit

This commit is contained in:
2025-10-18 16:50:09 +03:00
commit ec7a511af6
4 changed files with 120 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
# Exclude bpm archives
*.bpm
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
# Github repository
REPO="kovidgoyal/kitty"
# Get tag name using Github Rest API
TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name')
# Trim 'v' character in TAG_NAME variable
VERSION=$(echo "$TAG_NAME" | tr -d 'v')
echo "$VERSION"
+55
View File
@@ -0,0 +1,55 @@
name: kitty
description: A cross-platform, fast and feature-rich, GPU-based terminal emulator
version: 0.43.1
revision: 1
url: https://github.com/kovidgoyal/kitty
license: GPL3-or-later
architecture: any
type: source
depends:
- cairo
- dbus
- fontconfig
- freetype2
- harfbuzz
- hicolor-icon-theme
- lcms2
- libglvnd
- libpng
- libx11
- libxcursor
- libxi
- libxkbcommon
- openssl
- python3
- wayland
- xxhash
- zlib
optional_depends:
- imagemagick
- libcanberra
- python-pygments
make_depends:
- golang
- libxinerama
- libxrandr
- simde
- nerd-fonts-symbols
- wayland-protocols
downloads:
- url: https://github.com/kovidgoyal/kitty/releases/download/v${BPM_PKG_VERSION}/kitty-${BPM_PKG_VERSION}.tar.xz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: 44a875e34e6a5f9b8f599b25b0796c07a1506fec2b2310573e03077ef1ae159f
split_packages:
- name: kitty
- name: kitty-terminfo
description: Terminfo for Kitty
depends:
- kitty
- ncurses
- name: kitty-shell-integration
description: Shell integration for Kitty
depends:
- kitty
- python3
+51
View File
@@ -0,0 +1,51 @@
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
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"
python3 setup.py linux-package --update-check-interval=0
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package_kitty() {
cp -r linux-package "$BPM_OUTPUT"/usr
# Install shell completions
linux-package/bin/kitten __complete__ setup bash | install -Dm644 /dev/stdin "$BPM_OUTPUT"/usr/share/bash-completion/completions/kitty
linux-package/bin/kitten __complete__ setup fish | install -Dm644 /dev/stdin "$BPM_OUTPUT"/usr/share/fish/vendor_completions.d/kitty.fish
linux-package/bin/kitten __complete__ setup zsh | install -Dm644 /dev/stdin "$BPM_OUTPUT"/usr/share/zsh/site-functions/_kitty
# Remove files
rm -r "$BPM_OUTPUT"/usr/share/terminfo
rm -r "$BPM_OUTPUT"/usr/lib/kitty/shell-integration
# Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/kitty/LICENSE
}
package_kitty-terminfo() {
install -d "$BPM_OUTPUT"/usr/share/terminfo
tic -x -o "$BPM_OUTPUT"/usr/share/terminfo terminfo/kitty.terminfo
# Install package license
install -d "$BPM_OUTPUT"/usr/share/licenses/
ln -sf kitty "$BPM_OUTPUT"/usr/share/licenses/kitty
}
package_kitty-shell-integration() {
install -d "$BPM_OUTPUT"/usr/lib/kitty
cp -r shell-integration "$BPM_OUTPUT"/usr/lib/kitty
# Install package license
install -d "$BPM_OUTPUT"/usr/share/licenses/
ln -sf kitty "$BPM_OUTPUT"/usr/share/licenses/kitty
}